Skip to content

Commit

Permalink
fix: 3rd party scripts running
Browse files Browse the repository at this point in the history
  • Loading branch information
feildmaster committed Aug 12, 2024
1 parent 8b6afa8 commit f9376cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# UnderScript App Changelog

## Version 1.5.5 (2024-08-12)
1. Fixed cloudflare (again)

## Version 1.5.4 (2023-07-10)
1. Fixed cloudflare captcha

Expand Down
9 changes: 6 additions & 3 deletions src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ function createWindow() {
"'unsafe-eval'",
"'unsafe-inline'",
'https://www.google-analytics.com',
'https://www.googletagmanager.com',
'https://*.cloudflare.com',
'worker-src blob:'
';',
'worker-src',
'blob:',
].join(' '),
],
}
Expand All @@ -47,7 +50,7 @@ function createWindow() {
click: () => win.setFullScreen(!win.isFullScreen()),
}],
});

win.loadURL('https://undercards.net/SignIn');
win.setMenu(null);
win.maximize();
Expand Down Expand Up @@ -88,7 +91,7 @@ function createWindow() {
if (process.env.LOCAL_DIR) checkVersion().catch(console.error);
const { host, protocol } = new URL(url);
if (host === 'undercards.net') return;

event.preventDefault();
if (protocol !== 'http:' && protocol !== 'https:') return;
if (host === 'www.undercards.net') {
Expand Down

0 comments on commit f9376cd

Please sign in to comment.