chore: fixes
This commit is contained in:
parent
86a6b02e5f
commit
48e83d95f5
2 changed files with 6 additions and 6 deletions
|
@ -2,8 +2,8 @@ const id = Math.floor(Math.random() * Date.now())
|
|||
let i;
|
||||
let url = `https://coryd.dev/api/event/?page=${encodeURIComponent(window.location.href)}&num=${sessionStorage.getItem('id' || id)}&lang=${encodeURIComponent(navigator.language)}&nav=${encodeURIComponent(navigator.userAgent)}`
|
||||
if (window.sessionStorage && !window.sessionStorage?.getItem('id')) sessionStorage.setItem('id', id)
|
||||
if (window.localStorage && window.localStorage.getItem('i')) {
|
||||
i = localStorage.getItem('i')
|
||||
url = `${url}&i=${i}`
|
||||
if (window.localStorage && window.localStorage.getItem('ig')) {
|
||||
ig = localStorage.getItem('ig')
|
||||
url = `${url}&ig=${ig}`
|
||||
}
|
||||
if (!window.fathom) fetch(url).then((data) => {}).catch(err => {});
|
||||
if (!window.fathom) fetch(url).then(() => {}).catch(() => {});
|
Reference in a new issue