aboutsummaryrefslogtreecommitdiff
path: root/pointless/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'pointless/viewer')
-rw-r--r--pointless/viewer/init.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/pointless/viewer/init.js b/pointless/viewer/init.js
index a9294ea..cb01fab 100644
--- a/pointless/viewer/init.js
+++ b/pointless/viewer/init.js
@@ -28,8 +28,19 @@ function initCache() {
28 offlineCapableIndicator.style.visibility = "visible"; 28 offlineCapableIndicator.style.visibility = "visible";
29} 29}
30 30
31function checkPopupPermission() {
32 try {
33 const popup = window.open();
34 popup.close();
35 } catch(error) {
36 const warningMessage = document.getElementById("warning");
37 warningMessage.textContent = "A pop-up blocker is active. Make sure to allow pop-ups on this website.";
38 }
39}
40
31function init() { 41function init() {
32 initCache(); 42 initCache();
43 checkPopupPermission();
33 44
34 const viewer = new Viewer(); 45 const viewer = new Viewer();
35 46