chore: eventing + refactoring
This commit is contained in:
parent
9a957159e9
commit
d05bcc1b77
2 changed files with 6 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
let ig;
|
||||
let ignore;
|
||||
let url = `https://coryd.dev/api/event/?page=${encodeURIComponent(window.location.href)}&lang=${encodeURIComponent(navigator.language)}&nav=${encodeURIComponent(navigator.userAgent)}`
|
||||
if (window.localStorage && window.localStorage.getItem('ig')) {
|
||||
ig = localStorage.getItem('ig')
|
||||
url = `${url}&ig=${ig}`
|
||||
if (window.localStorage && window.localStorage.getItem('ignore')) {
|
||||
ignore = localStorage.getItem('ignore')
|
||||
url = `${url}&ignore=${ignore}`
|
||||
}
|
||||
if (!window.fathom) fetch(url).then(() => {}).catch(() => {});
|
Reference in a new issue