mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
chore: just wanna add some code
This commit is contained in:
@@ -65,21 +65,40 @@ browser.tabs.onUpdated.addListener((tabId: number, changInfo: Tabs.OnUpdatedChan
|
||||
})
|
||||
|
||||
if (changInfo.status === 'loading') {
|
||||
const css = `
|
||||
body {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s;
|
||||
overflow-y: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
`
|
||||
// const css = `
|
||||
// body {
|
||||
// opacity: 0;
|
||||
// transition: opacity 0.5s;
|
||||
// overflow-y: hidden;
|
||||
// pointer-events: none;
|
||||
// }
|
||||
// `
|
||||
|
||||
browser.scripting.insertCSS({
|
||||
css,
|
||||
css: `
|
||||
body {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s;
|
||||
overflow-y: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
`,
|
||||
target: {
|
||||
tabId,
|
||||
},
|
||||
})
|
||||
setTimeout(() => {
|
||||
browser.scripting.insertCSS({
|
||||
css: `
|
||||
body {
|
||||
opacity: 1;
|
||||
overflow-y: auto;
|
||||
pointer-events: auto;
|
||||
}
|
||||
`,
|
||||
target: { tabId },
|
||||
})
|
||||
}, 1500)
|
||||
|
||||
// If it not a macOS, we will inject CSS to design the scrollbar
|
||||
if (!navigator.userAgent.includes('Mac OS X')) {
|
||||
@@ -114,18 +133,18 @@ browser.tabs.onUpdated.addListener((tabId: number, changInfo: Tabs.OnUpdatedChan
|
||||
}
|
||||
}
|
||||
else if (changInfo.status === 'complete') {
|
||||
const css = `
|
||||
body {
|
||||
opacity: 1;
|
||||
overflow-y: auto;
|
||||
pointer-events: auto;
|
||||
}
|
||||
`
|
||||
// const css = `
|
||||
// body {
|
||||
// opacity: 1;
|
||||
// overflow-y: auto;
|
||||
// pointer-events: auto;
|
||||
// }
|
||||
// `
|
||||
|
||||
browser.scripting.insertCSS({
|
||||
css,
|
||||
target: { tabId },
|
||||
})
|
||||
// browser.scripting.insertCSS({
|
||||
// css,
|
||||
// target: { tabId },
|
||||
// })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -65,7 +65,7 @@ async function setAppLanguage() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div bg="$bew-bg" text="$bew-text-1">
|
||||
<div bg="$bew-bg" text="$bew-text-1" min-h-100vh>
|
||||
<div m-auto max-w="$bew-page-max-width">
|
||||
<Transition name="topbar">
|
||||
<Topbar
|
||||
|
||||
@@ -13,10 +13,6 @@ html, body {
|
||||
// padding: 0;
|
||||
// }
|
||||
|
||||
#bewly {
|
||||
background-color: var(--bew-bg);
|
||||
}
|
||||
|
||||
// html {
|
||||
// filter: none !important;
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user