mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
cleanup
This commit is contained in:
parent
6a6264e21c
commit
4bdf08e3aa
2 changed files with 5 additions and 2 deletions
2
main.js
2
main.js
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue