This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/index.html

54 lines
2.4 KiB
HTML
Raw Normal View History

2019-02-07 03:34:39 +05:30
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
2020-08-12 15:12:42 +05:30
<meta name="application-name" content="Hydrogen Chat"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
2020-08-12 15:12:42 +05:30
<meta name="apple-mobile-web-app-title" content="Hydrogen Chat">
<meta name="description" content="A matrix chat application">
2020-10-15 14:47:33 +05:30
<link rel="apple-touch-icon" href="assets/icon-maskable.png">
<link rel="stylesheet" type="text/css" href="src/ui/web/css/main.css">
<link rel="stylesheet" type="text/css" href="src/ui/web/css/themes/element/theme.css" title="Element Theme">
<link rel="alternate stylesheet" type="text/css" href="src/ui/web/css/themes/bubbles/theme.css" title="Bubbles Theme">
2019-02-07 03:34:39 +05:30
</head>
2020-08-12 15:12:42 +05:30
<body class="hydrogen">
<script id="version" type="disabled">
2020-08-12 15:12:42 +05:30
window.HYDROGEN_VERSION = "%%VERSION%%";
window.HYDROGEN_GLOBAL_HASH = "%%GLOBAL_HASH%%";
</script>
<script id="main" type="module">
2020-08-12 15:19:42 +05:30
import {main} from "./src/main.js";
main(document.body, {
worker: "src/worker.js",
olm: {
wasm: "lib/olm/olm.wasm",
legacyBundle: "lib/olm/olm_legacy.js",
wasmBundle: "lib/olm/olm.js",
}
});
2019-02-11 01:55:29 +05:30
</script>
2020-10-15 15:19:09 +05:30
<script id="service-worker" type="module">
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js')
2020-10-15 15:19:09 +05:30
.then(function(registration) {
console.log("Service Worker registered");
registration.onupdatefound = function() {
const newWorker = registration.installing;
alert("update found!");
newWorker.onstatechange = function() {
if (newWorker.state === "installed") {
alert("new worker is now on state " + newWorker.state);
// if (confirm("update installed! shall I skip waiting?")) {
// newWorker.skipWaiting();
// }
}
}
};
});
}
2020-08-13 21:29:10 +05:30
</script>
2019-02-07 03:34:39 +05:30
</body>
2019-02-27 03:15:58 +05:30
</html>