Skip to content

Commit

Permalink
fix(adblocker): fix blank screen
Browse files Browse the repository at this point in the history
- fix #1942
- fix #2100
- fix #2103
  • Loading branch information
JellyBrick committed May 31, 2024
1 parent b572623 commit cd4f0cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"engines": {
"node": ">=18.0.0"
"node": ">=18.0.0",
"pnpm": ">=8"
},
"pnpm": {
"overrides": {
Expand Down Expand Up @@ -228,8 +229,5 @@
"package": true,
"unreleased": true,
"output": "changelog.md"
},
"engines": {
"pnpm": ">=8"
}
}
12 changes: 7 additions & 5 deletions src/plugins/adblocker/blocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit cd4f0cc

Please sign in to comment.