aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html2
-rw-r--r--pointless/viewer/init.js11
2 files changed, 12 insertions, 1 deletions
diff --git a/index.html b/index.html
index fa1ef21..ddcdbcf 100644
--- a/index.html
+++ b/index.html
@@ -43,7 +43,7 @@
43 <code>\setbeameroption{show notes on second screen=right}</code>) 43 <code>\setbeameroption{show notes on second screen=right}</code>)
44 </p> 44 </p>
45 45
46 <p class="warning"> 46 <p id="warning" class="warning">
47 <noscript>A web browser with JavaScript support is required to use this application.</noscript> 47 <noscript>A web browser with JavaScript support is required to use this application.</noscript>
48 </p> 48 </p>
49 49
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