Disable script loading in some iframes

This commit is contained in:
the1812 2019-12-11 19:27:26 +08:00
parent 028c5fa54e
commit 9ab76cfcf2

View File

@ -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') {