mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 18:26:38 -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:
@ -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 || {};
|
||||
|
Reference in New Issue
Block a user