mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Disable script loading in some iframes
This commit is contained in:
parent
028c5fa54e
commit
9ab76cfcf2
@ -53,8 +53,13 @@ import { getScriptBlocker } from './script-blocker'
|
|||||||
import { installStyle, uninstallStyle } from './custom-styles'
|
import { installStyle, uninstallStyle } from './custom-styles'
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
const redundantFrames = [
|
||||||
|
'https://message.bilibili.com/pages/nav/index_new_sync',
|
||||||
|
'https://message.bilibili.com/pages/nav/index_new_pc_sync',
|
||||||
|
'https://t.bilibili.com/h5/dynamic/specification',
|
||||||
|
]
|
||||||
if (await GM.getValue('customNavbar') === true
|
if (await GM.getValue('customNavbar') === true
|
||||||
&& document.URL === 'https://message.bilibili.com/pages/nav/index_new_sync') {
|
&& redundantFrames.includes(document.URL)) {
|
||||||
if (await GM.getValue('useDarkStyle') === true) {
|
if (await GM.getValue('useDarkStyle') === true) {
|
||||||
document.documentElement.style.setProperty('--theme-color', await GM.getValue('customStyleColor'))
|
document.documentElement.style.setProperty('--theme-color', await GM.getValue('customStyleColor'))
|
||||||
if (typeof offlineData === 'undefined') {
|
if (typeof offlineData === 'undefined') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user