diff options
author | pacien | 2018-07-21 19:51:27 +0200 |
---|---|---|
committer | pacien | 2018-07-21 19:51:27 +0200 |
commit | c76619549afc86fc8912451113347f9e7153c8d1 (patch) | |
tree | 614701c878f6bef7bea2f97d67cb85beba37cbc6 /pointless | |
parent | 961bfe78d7f3ad7895c744580b94184980e45baa (diff) | |
download | beamer-viewer-c76619549afc86fc8912451113347f9e7153c8d1.tar.gz |
Use self-closing page for popup check
Diffstat (limited to 'pointless')
-rw-r--r-- | pointless/viewer/init.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pointless/viewer/init.js b/pointless/viewer/init.js index cb01fab..5f04eac 100644 --- a/pointless/viewer/init.js +++ b/pointless/viewer/init.js | |||
@@ -29,10 +29,9 @@ function initCache() { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | function checkPopupPermission() { | 31 | function checkPopupPermission() { |
32 | try { | 32 | const popup = window.open("popup.html"); |
33 | const popup = window.open(); | 33 | |
34 | popup.close(); | 34 | if (popup == null) { |
35 | } catch(error) { | ||
36 | const warningMessage = document.getElementById("warning"); | 35 | const warningMessage = document.getElementById("warning"); |
37 | warningMessage.textContent = "A pop-up blocker is active. Make sure to allow pop-ups on this website."; | 36 | warningMessage.textContent = "A pop-up blocker is active. Make sure to allow pop-ups on this website."; |
38 | } | 37 | } |