mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
feat: add dark mode support for account settings page(帳號中心頁)
This commit is contained in:
@@ -67,8 +67,10 @@ function isSupportedPages() {
|
||||
|| /https?:\/\/(?:www\.)?bilibili\.com\/read\/(?!pcpreview).*/.test(currentUrl)
|
||||
// 404 page
|
||||
|| /^https?:\/\/(?:www\.)?bilibili\.com\/404.*$/.test(currentUrl)
|
||||
// creative center page
|
||||
// creative center page 創作中心頁
|
||||
|| /^https?:\/\/member\.bilibili\.com\/platform.*$/.test(currentUrl)
|
||||
// account settings page 帳號中心頁
|
||||
|| /^https?:\/\/account\.bilibili\.com\/.*$/.test(currentUrl)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ export async function getManifest() {
|
||||
'*://space.bilibili.com/*',
|
||||
'*://message.bilibili.com/*',
|
||||
'*://member.bilibili.com/*',
|
||||
'*://account.bilibili.com/*',
|
||||
'*://www.hdslb.com/*',
|
||||
],
|
||||
js: ['./dist/contentScripts/index.global.js'],
|
||||
|
||||
41
src/styles/adaptedStyles/accountSettingsPage.scss
Normal file
41
src/styles/adaptedStyles/accountSettingsPage.scss
Normal file
@@ -0,0 +1,41 @@
|
||||
.bewly-design.accountSettingsPage {
|
||||
// #region theme color adaption part
|
||||
// Increase the priority of the style inside by writing a non-existent selector in `:not()`
|
||||
:not(foobar) {
|
||||
// do nothing..
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region dark mode adaption part
|
||||
&.dark {
|
||||
.top-img,
|
||||
.top_bg {
|
||||
filter: invert(1) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
.security_content {
|
||||
filter: invert(0.98) hue-rotate(180deg) brightness(1.1);
|
||||
|
||||
img,
|
||||
video,
|
||||
iframe,
|
||||
[style*="background-image: url"],
|
||||
[style*="background: url"],
|
||||
.invitation-img {
|
||||
filter: invert(0.98) hue-rotate(180deg) brightness(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
.mp-img {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.xts,
|
||||
.table-normal *,
|
||||
.record-login-descript,
|
||||
.black-btn:not(:hover) {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
@@ -133,6 +133,11 @@ async function setupStyles() {
|
||||
// })
|
||||
// })
|
||||
}
|
||||
// account settings page
|
||||
else if (/^https?:\/\/account\.bilibili\.com\/.*$/.test(currentUrl)) {
|
||||
await import('./accountSettingsPage.scss')
|
||||
document.documentElement.classList.add('accountSettingsPage')
|
||||
}
|
||||
}
|
||||
|
||||
setupStyles()
|
||||
|
||||
Reference in New Issue
Block a user