only try to persist in safari
This commit is contained in:
parent
c3dbf63419
commit
30791ffe85
13
index.js
13
index.js
@ -4,7 +4,9 @@ import BaseView from "/ui/base_view.js";
|
||||
import InfoView from "/ui/info_view.js";
|
||||
import Layout from "/ui/layout.js";
|
||||
|
||||
navigator.storage.persisted().then((persistent) => {
|
||||
|
||||
try {
|
||||
navigator.storage.persisted().then((persistent) => {
|
||||
if (!persistent && navigator.vendor === "Apple Computer, Inc.") {
|
||||
const question =
|
||||
"S'schaut so aus als würdest du an Safari-Browser benutzn. S'isch " +
|
||||
@ -15,8 +17,8 @@ navigator.storage.persisted().then((persistent) => {
|
||||
"Wennst magst kannt ma aba probian ob ma des Löschn fian Block " +
|
||||
"ausschaltn kenna. Wennst magst klick oanfach auf \"Ok\"!\n" +
|
||||
"\n" +
|
||||
"Wenns gangen is kimsch danach glei zum Block, und falls nit bekommst " +
|
||||
"dazu no a extra Nachricht.";
|
||||
"Wenns gangen is kimsch danach glei zum Block, und falls nit " +
|
||||
"bekommst dazu no a extra Nachricht.";
|
||||
|
||||
const failure =
|
||||
"S'isch leida nit gangen, Safari hat na gsagt. Du kansch entweda an " +
|
||||
@ -32,7 +34,10 @@ navigator.storage.persisted().then((persistent) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("failed to try to persist in safary: ", error);
|
||||
}
|
||||
|
||||
m.route.prefix = "";
|
||||
m.route(document.body, "/", {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user