mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: support the global navigation feature
This commit is contained in:
parent
9a3b11e738
commit
cb40cded39
2 changed files with 7 additions and 2 deletions
|
|
@ -21,8 +21,11 @@ export function resolveMeta(): Partial<MetaData> {
|
|||
export function isInRepoPage() {
|
||||
const repoHeadSelector = '.repohead' // legacy
|
||||
const authorNameSelector = '.author[itemprop="author"]'
|
||||
const globalNavigationSelectors = '.AppHeader-context-item[data-hovercard-type="user"]'
|
||||
return Boolean(
|
||||
document.querySelector(repoHeadSelector) || document.querySelector(authorNameSelector),
|
||||
document.querySelector(
|
||||
[repoHeadSelector, authorNameSelector, globalNavigationSelectors].join(),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ $minimal-z-index: max(
|
|||
}
|
||||
|
||||
html[data-with-gitako-spacing='true'] {
|
||||
body {
|
||||
body,
|
||||
.AppHeader deferred-side-panel div[data-modal-dialog-overlay] // side panel opened via clicking github top-left icon in global navigation mode
|
||||
{
|
||||
@media screen {
|
||||
margin-left: var(--gitako-width);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue