aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Frans de Jonge <fransdejonge@gmail.com> 2024-12-11 14:47:01 +0100
committerGravatar GitHub <noreply@github.com> 2024-12-11 14:47:01 +0100
commit12c659fb2fa21342d76b1a76c8c921117b9a48e5 (patch)
tree2857d85bdb037bda785d61b5541df007e0b38415 /p/scripts
parent159e0d4efd6fe518a7ec4c6a986e2fba50bdecef (diff)
Always prevent default regardless of window.open() return status (#7089)
* Always prevent default regardless of window.open() return status Fixes regression noted in https://github.com/FreshRSS/FreshRSS/pull/7077#discussion_r1879016226 * Update p/scripts/main.js Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 0093b3330..baedda55c 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1099,10 +1099,8 @@ function init_shortcuts() {
const link_go_website = document.querySelector('.flux.current a.go_website');
if (link_go_website) {
- const newWindow = window.open(link_go_website.href, '_blank', 'noopener');
- if (newWindow) {
- ev.preventDefault();
- }
+ window.open(link_go_website.href, '_blank', 'noopener');
+ ev.preventDefault();
}
return;
}