Skip to content

Commit 4b418e9

Browse files
author
ozelot379
committed
Docker images
1 parent 6e402e1 commit 4b418e9

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

‎src/js/index.js‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,24 @@ import "./../css/style.less";
66

77
document.addEventListener("DOMContentLoaded", () => {
88
const toastMessage = document.getElementById("toastMessage");
9-
OfflinePluginRuntime.install({
10-
onInstalled: () => {
11-
showToastMessage("Ready for install and use offline", 5000, () => {
129

13-
});
14-
},
15-
onUpdateReady: () => {
16-
OfflinePluginRuntime.applyUpdate();
17-
},
18-
onUpdated: () => {
19-
showToastMessage("Update installed - Reloading ...", 2000, () => {
20-
location.reload();
21-
});
22-
}
23-
});
10+
if (location.hostname !== "localhost" && location.hostname !== "127.0.0.1") {
11+
OfflinePluginRuntime.install({
12+
onInstalled: () => {
13+
showToastMessage("Ready for install and use offline", 5000, () => {
14+
15+
});
16+
},
17+
onUpdateReady: () => {
18+
OfflinePluginRuntime.applyUpdate();
19+
},
20+
onUpdated: () => {
21+
showToastMessage("Update installed - Reloading ...", 2000, () => {
22+
location.reload();
23+
});
24+
}
25+
});
26+
}
2427

2528
const selectInputFileButton = document.getElementById("selectInputFileButton");
2629
selectInputFileButton.addEventListener("change", startConvert);

0 commit comments

Comments
 (0)