1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 01:38:27 -04:00

fix silly AMP and lighthouse warnings

https://developers.google.com/web/updates/2018/07/page-lifecycle-api#the-unload-event
This commit is contained in:
Jake Jarvis 2020-11-19 10:56:25 -05:00
parent e6400400f1
commit c58dddbed2
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
6 changed files with 7 additions and 5 deletions

View File

@ -18,7 +18,6 @@
"uses-optimized-images": "warn",
"uses-rel-preconnect": "warn",
"is-crawlable": "off",
"no-unload-listeners": "off",
"offscreen-images": "off",
"uses-long-cache-ttl": "off",
"uses-responsive-images": "off",

View File

@ -203,7 +203,10 @@
// }
};
addEventListenerFunc("unload", sendOnLeave, false);
// https://developers.google.com/web/updates/2018/07/page-lifecycle-api#the-unload-event
var terminationEvent = "onpagehide" in self ? "pagehide" : "unload";
addEventListenerFunc(terminationEvent, sendOnLeave, false);
// addEventListenerFunc("unload", sendOnLeave, false);
/** if scroll **/
var body = doc.body || {};

View File

@ -15,7 +15,7 @@ image: "images/terminal.png"
draft: false
---
{{< image src="images/terminal.png" width="240" alt="Terminal.app on macOS" />}}
{{< image src="images/terminal.png" width="320" alt="Terminal.app on macOS" />}}
You may have noticed the recent trend of techies [posting their "dotfiles" on GitHub](https://github.com/topics/dotfiles) for the world to see. These usually contain shortcuts compatible with Bash terminals to automate convoluted commands that, I'll admit, I needed to Google every single time.

View File

@ -204,11 +204,11 @@
status = 302
[[redirects]]
from = "/comp20/*"
to = "https://jakejarvis.github.io/comp20/"
to = "https://jakejarvis.github.io/comp20/:splat"
status = 302
[[redirects]]
from = "/scrabble/*"
to = "https://jakejarvis.github.io/scrabble/"
to = "https://jakejarvis.github.io/scrabble/:splat"
status = 302
# H A C K E R M A N ( ͡° ͜ʖ ͡°)