Deployed on 2024-05-08T16:21:13-05:00
This commit is contained in:
parent
5191a10f1e
commit
40aa4343a7
2 changed files with 10 additions and 6 deletions
12
app.js
12
app.js
|
|
@ -5,26 +5,30 @@ document.addEventListener('click', getFollows);
|
||||||
function getFollows(evt) {
|
function getFollows(evt) {
|
||||||
const el = evt.target;
|
const el = evt.target;
|
||||||
if (el.tagName.toLowerCase() !== 'a') {
|
if (el.tagName.toLowerCase() !== 'a') {
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = el.dataset.name;
|
const name = el.dataset.name;
|
||||||
|
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = el.href;
|
const url = el.href;
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!window.umami) {
|
if (!window.umami) {
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const umProm = umami.trackEvent('visit', { type: 'click', site: name });
|
const umProm = umami.trackEvent('visit', { type: 'click', site: name });
|
||||||
|
|
||||||
|
if (!umProm) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!el.target || el.target.match(/^_(self|parent|top)$/i)) {
|
if (!el.target || el.target.match(/^_(self|parent|top)$/i)) {
|
||||||
// If we're not opening in a new tab, then try to send event before navigating away
|
// If we're not opening in a new tab, then try to send event before navigating away
|
||||||
// Don't wait too long though (half a second, at most)
|
// Don't wait too long though (half a second, at most)
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<title>Dan Jones's Links</title>
|
<title>Dan Jones's Links</title>
|
||||||
<link rel="stylesheet" href="https://maxst.icons8.com/vue-static/landings/line-awesome/line-awesome/1.3.0/css/line-awesome.min.css"/>
|
<link rel="stylesheet" href="https://maxst.icons8.com/vue-static/landings/line-awesome/line-awesome/1.3.0/css/line-awesome.min.css"/>
|
||||||
<link rel="stylesheet" href="style.css?ver=6abe44c"/>
|
<link rel="stylesheet" href="style.css?ver=2dfd947"/>
|
||||||
<script async data-website-id="698f40c8-f098-4287-8d01-f98e55902d6c" data-do-not-track="true" src="https://whoami.goodevilgenius.org/whoami.js"></script>
|
<script async data-website-id="698f40c8-f098-4287-8d01-f98e55902d6c" data-do-not-track="true" src="https://whoami.goodevilgenius.org/whoami.js"></script>
|
||||||
<script async src="app.js?ver=6abe44c"></script>
|
<script async src="app.js?ver=2dfd947"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="py-3 mb-4 border-bottom">
|
<header class="py-3 mb-4 border-bottom">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue