mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 11:33:41 +02:00
Removed script file import
Combined both script.js and legacy.js into a single <script> tag on index.html. The page uses less than 15 sloc of JS excluding the Service Worker.
This commit is contained in:
parent
a13b86765b
commit
4d74cc4607
4 changed files with 17 additions and 16 deletions
|
@ -1,7 +0,0 @@
|
||||||
// Promote IE to Edge
|
|
||||||
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
|
|
||||||
window.location = 'microsoft-edge:' + window.location;
|
|
||||||
setTimeout(function() {
|
|
||||||
window.location = 'https://go.microsoft.com/fwlink/?linkid=2135547';
|
|
||||||
},1);
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
if(navigator.serviceWorker) {
|
|
||||||
navigator.serviceWorker.register("sw.js",{
|
|
||||||
scope: "/"
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -40,7 +40,21 @@
|
||||||
</picture>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<script src="assets/js/script.js" type="module"></script>
|
<script>
|
||||||
<script src="assets/js/legacy.js" nomodule></script>
|
// Promote IE to Edge
|
||||||
|
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
|
||||||
|
window.location = 'microsoft-edge:' + window.location;
|
||||||
|
setTimeout(function() {
|
||||||
|
window.location = 'https://go.microsoft.com/fwlink/?linkid=2135547';
|
||||||
|
},1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register SW if supported by browser
|
||||||
|
if(navigator.serviceWorker) {
|
||||||
|
navigator.serviceWorker.register("sw.js",{
|
||||||
|
scope: "/"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const version = "1611341781";
|
const version = "1612093525";
|
||||||
const root = "/";
|
const root = "/";
|
||||||
|
|
||||||
let activeCaches = [
|
let activeCaches = [
|
||||||
|
@ -11,7 +11,6 @@ self.addEventListener("install", event => {
|
||||||
root + "index.html",
|
root + "index.html",
|
||||||
root + "assets/css/style.css",
|
root + "assets/css/style.css",
|
||||||
root + "assets/img/favicon.png",
|
root + "assets/img/favicon.png",
|
||||||
root + "assets/js/script.js",
|
|
||||||
root + "assets/img/pattern.gif",
|
root + "assets/img/pattern.gif",
|
||||||
root + "assets/fonts/RobotoMono-Bold.woff2",
|
root + "assets/fonts/RobotoMono-Bold.woff2",
|
||||||
root + "assets/fonts/RobotoMono-Regular.woff2"
|
root + "assets/fonts/RobotoMono-Regular.woff2"
|
||||||
|
|
Loading…
Add table
Reference in a new issue