Skip to content

Commit cd4f0cc

Browse files
committed
fix(adblocker): fix blank screen
- fix #1942 - fix #2100 - fix #2103
1 parent b572623 commit cd4f0cc

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@
121121
"typecheck": "tsc -p tsconfig.json --noEmit"
122122
},
123123
"engines": {
124-
"node": ">=18.0.0"
124+
"node": ">=18.0.0",
125+
"pnpm": ">=8"
125126
},
126127
"pnpm": {
127128
"overrides": {
@@ -228,8 +229,5 @@
228229
"package": true,
229230
"unreleased": true,
230231
"output": "changelog.md"
231-
},
232-
"engines": {
233-
"pnpm": ">=8"
234232
}
235233
}

src/plugins/adblocker/blocker.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ import { app, net } from 'electron';
88
const SOURCES = [
99
'https://raw.githubusercontent.com/kbinani/adblock-youtube-ads/master/signed.txt',
1010
// UBlock Origin
11-
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt',
12-
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt',
13-
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2021.txt',
14-
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2022.txt',
15-
'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2023.txt',
11+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters.txt',
12+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/quick-fixes.txt',
13+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/unbreak.txt',
14+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2020.txt',
15+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2021.txt',
16+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2022.txt',
17+
'https://raw.githubusercontent.com/ghostery/adblocker/master/packages/adblocker/assets/ublock-origin/filters-2023.txt',
1618
// Fanboy Annoyances
1719
'https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt',
1820
// AdGuard

src/renderer.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ const preload = async () => {
225225
t: i18t.bind(i18next),
226226
};
227227
defineYTMDTransElements();
228-
document.body.dataset.os = navigator.userAgent;
228+
if (document.body?.dataset?.os) {
229+
document.body.dataset.os = navigator.userAgent;
230+
}
229231
};
230232

231233
const main = async () => {

0 commit comments

Comments
 (0)