diff --git a/safari-warning-innenstadt.js b/safari-warning-innenstadt.js new file mode 100644 index 0000000..a7d9325 --- /dev/null +++ b/safari-warning-innenstadt.js @@ -0,0 +1,29 @@ +const DISMISS_STORAGE_KEY = 'wiai-safari-warning-dismissed'; +const DISMISS_NOTIFICATION_ID = 'wiai-safari-warning'; + +function dismissNotification(notification) { + window.localStorage.setItem(DISMISS_STORAGE_KEY, 1); + document.getElementById(DISMISS_NOTIFICATION_ID).style.display = 'none'; +} + +window.addEventListener('load', function () { + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + const dismissed = window.localStorage && window.localStorage.getItem(DISMISS_STORAGE_KEY) == 1; + if (isSafari && !dismissed) { + const notification = document.createElement('div'); + notification.id = DISMISS_NOTIFICATION_ID; + + notification.innerHTML = ` +
+ Hinweis für alle Safari-Nutzer:innen: + Wenn beim Aufruf von Videos, die in Panopto zur Verfügung stehen, immer wieder die Anmelde-Seite (Shibboleth) erscheint, dann überprüft bitte +die Cookie-Einstellungen eures Safari-Browsers, wie in der Anleitung von Panopto beschrieben. Die Nutzung eines anderer Browsers könnte das Problem auch lösen, z. B. Google Chrome oder Mozilla Firefox. +Wendet euch bei Problemen an den Technik-Support über die rote Sprechblase unten rechts. + (Verbergen) +
+`; + + document.querySelector('#section-0 .section').appendChild(notification); + } +});