navigator.platform is depreciated
This commit is contained in:
parent
956966fbe9
commit
2429845dd6
@ -70,8 +70,8 @@ window.onload = function() {
|
|||||||
label.control.label = label
|
label.control.label = label
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/Win/.test(navigator.platform) || /Linux/.test(navigator.platform)) accessKeyModifiers = "Alt+Maj+"
|
if (/Win/.test(navigator.userAgent) || /Linux/.test(navigator.userAgent)) accessKeyModifiers = "Alt+Maj+"
|
||||||
else if (/Mac/.test(navigator.platform)) accessKeyModifiers = "⌃⌥"
|
else if (/Mac/.test(navigator.userAgent)) accessKeyModifiers = "⌃⌥"
|
||||||
for (node of document.querySelectorAll("*[accesskey]")) {
|
for (node of document.querySelectorAll("*[accesskey]")) {
|
||||||
shortcut = ` [${node.accessKeyLabel||(accessKeyModifiers+node.accessKey)}]`
|
shortcut = ` [${node.accessKeyLabel||(accessKeyModifiers+node.accessKey)}]`
|
||||||
if (node.title) node.title += shortcut
|
if (node.title) node.title += shortcut
|
||||||
@ -83,7 +83,7 @@ window.onload = function() {
|
|||||||
colorPickerInput.value = window.getComputedStyle(grid).getPropertyValue("--bs-body-color")
|
colorPickerInput.value = window.getComputedStyle(grid).getPropertyValue("--bs-body-color")
|
||||||
|
|
||||||
if ("serviceWorker" in navigator) {
|
if ("serviceWorker" in navigator) {
|
||||||
navigator.serviceWorker.register(`service-worker.php?location=${location.pathname}`)
|
navigator.serviceWorker.register(`service-worker.js`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,3 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
if (isset($_SESSION["currentGrid"]))
|
|
||||||
$currentGrid = $_SESSION["currentGrid"];
|
|
||||||
else
|
|
||||||
$currentGrid = ".";
|
|
||||||
header ("Content-type: application/javascript");
|
|
||||||
?>
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved.
|
Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved.
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -24,7 +16,7 @@ Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved.
|
|||||||
const OFFLINE_VERSION = 1;
|
const OFFLINE_VERSION = 1;
|
||||||
const CACHE_NAME = "offline";
|
const CACHE_NAME = "offline";
|
||||||
// Customize this with a different URL if needed.
|
// Customize this with a different URL if needed.
|
||||||
const OFFLINE_URL = "<?=$currentGrid?>";
|
const OFFLINE_URL = ".";
|
||||||
|
|
||||||
self.addEventListener("install", (event) => {
|
self.addEventListener("install", (event) => {
|
||||||
event.waitUntil(
|
event.waitUntil(
|
Loading…
x
Reference in New Issue
Block a user