Bladeren bron

windows.open noopener (#7077)

fix https://github.com/FreshRSS/FreshRSS/issues/6862
Rework https://github.com/FreshRSS/FreshRSS/pull/2506
Alexandre Alapetite 1 jaar geleden
bovenliggende
commit
3dc997d432
1 gewijzigde bestanden met toevoegingen van 1 en 3 verwijderingen
  1. 1 3
      p/scripts/main.js

+ 1 - 3
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();
+				const newWindow = window.open(link_go_website.href, '_blank', 'noopener');
 				if (newWindow) {
-					newWindow.opener = null;
-					newWindow.location = link_go_website.href;
 					ev.preventDefault();
 				}
 			}