This commit is contained in:
Azgaar 2022-05-13 22:42:26 +03:00
parent 6a6264e21c
commit 4bdf08e3aa
2 changed files with 5 additions and 2 deletions

View file

@ -10,7 +10,7 @@ const TIME = DEBUG || !PRODUCTION;
const WARN = true; const WARN = true;
const ERROR = true; const ERROR = true;
if ("serviceWorker" in navigator) { if (PRODUCTION && "serviceWorker" in navigator) {
window.addEventListener("load", () => { window.addEventListener("load", () => {
navigator.serviceWorker.register("./sw.js").catch(err => { navigator.serviceWorker.register("./sw.js").catch(err => {
console.error("ServiceWorker registration failed: ", err); console.error("ServiceWorker registration failed: ", err);

View file

@ -33,10 +33,13 @@ function createButton() {
} }
function openDialog() { function openDialog() {
alertMessage.innerHTML = /* html */ `You can install the tool so that it will look and feel like desktop application`; alertMessage.innerHTML = /* html */ `You can install the tool so that it will look and feel like desktop application:
have its own icon on your home screen and work offline with some limitations
`;
$("#alert").dialog({ $("#alert").dialog({
resizable: false, resizable: false,
title: "Install the Application", title: "Install the Application",
width: "38em",
buttons: { buttons: {
Install: function () { Install: function () {
$(this).dialog("close"); $(this).dialog("close");