fix(adblocker): fix blank screen

- fix #1942
- fix #2100
- fix #2103
This commit is contained in:
JellyBrick
2024-06-01 04:34:21 +09:00
parent b572623442
commit cd4f0ccad7
3 changed files with 12 additions and 10 deletions

View File

@ -121,7 +121,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"engines": {
"node": ">=18.0.0"
"node": ">=18.0.0",
"pnpm": ">=8"
},
"pnpm": {
"overrides": {
@ -228,8 +229,5 @@
"package": true,
"unreleased": true,
"output": "changelog.md"
},
"engines": {
"pnpm": ">=8"
}
}

View File

@ -8,11 +8,13 @@ import { app, net } from 'electron';
const SOURCES = [
'https://raw.githubusercontent.com/kbinani/adblock-youtube-ads/master/signed.txt',
// UBlock Origin
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt',
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt',
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2021.txt',
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2022.txt',
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2023.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/quick-fixes.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/unbreak.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2020.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2021.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2022.txt',
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2023.txt',
// Fanboy Annoyances
'https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt',
// AdGuard

View File

@ -225,7 +225,9 @@ const preload = async () => {
t: i18t.bind(i18next),
};
defineYTMDTransElements();
document.body.dataset.os = navigator.userAgent;
if (document.body?.dataset?.os) {
document.body.dataset.os = navigator.userAgent;
}
};
const main = async () => {