mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-13 19:13:42 +02:00
* wip(22w6a): add glitch bg * wip(22w6b): add content and more glitching * wip(22w7a): add card backdrop-filter * wip(22w7b): add visibilitychange event * wip(22w7c): add link click handler * wip(22w7d): add webkit backdrop filter support * wip(22w7e): fix font size * wip(22w7f): refactor glitch * wip(22w7g): add forceBg to glitch * wip(22w7h): add error page * wip(22w7i): hide contact button * feat: add OGP tags Co-authored-by: Cloud Shell <cloud-shell@victor-westerlund.iam.gserviceaccount.com>
14 lines
No EOL
450 B
JavaScript
14 lines
No EOL
450 B
JavaScript
import { default as Glitch } from "./glitch/Glitch.mjs";
|
|
|
|
const logging = "https://victorwesterlund-logging-dnzfgzf6za-lz.a.run.app";
|
|
|
|
// Log link clicks
|
|
for(let link of document.getElementsByTagName("a")) {
|
|
link.addEventListener("click", event => {
|
|
event.preventDefault();
|
|
navigator?.sendBeacon(logging, event);
|
|
window.location.href = event.target.href;
|
|
});
|
|
}
|
|
|
|
window.glitch = new Glitch(document.body.parentElement); |