style: 📈 move constants to the top
This commit is contained in:
parent
e2a61a8c68
commit
b322ef9759
1 changed files with 4 additions and 6 deletions
|
@ -6,6 +6,10 @@
|
||||||
const noBtn = ackeeBanner.querySelector('.negative');
|
const noBtn = ackeeBanner.querySelector('.negative');
|
||||||
const confirmKey = 'ackeeDetailed';
|
const confirmKey = 'ackeeDetailed';
|
||||||
|
|
||||||
|
const ackeeServer = 'https://ackee.sebin-nyshkim.net';
|
||||||
|
const ackeeDomainId = 'e60cc3de-916c-424c-ac6e-2fd43d41e240';
|
||||||
|
const ackeeOpts = { detailed: true };
|
||||||
|
|
||||||
yesBtn.addEventListener('click', () => localStorage.setItem(confirmKey, true));
|
yesBtn.addEventListener('click', () => localStorage.setItem(confirmKey, true));
|
||||||
noBtn.addEventListener('click', () => localStorage.setItem(confirmKey, false));
|
noBtn.addEventListener('click', () => localStorage.setItem(confirmKey, false));
|
||||||
|
|
||||||
|
@ -13,12 +17,6 @@
|
||||||
ackeeBanner.show();
|
ackeeBanner.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
const ackeeServer = 'https://ackee.sebin-nyshkim.net';
|
|
||||||
const ackeeDomainId = 'e60cc3de-916c-424c-ac6e-2fd43d41e240';
|
|
||||||
const ackeeOpts = {
|
|
||||||
detailed: localStorage.getItem(confirmKey) === 'true'
|
|
||||||
};
|
|
||||||
|
|
||||||
if (localStorage.getItem(confirmKey) === 'true') {
|
if (localStorage.getItem(confirmKey) === 'true') {
|
||||||
const instance = ackeeTracker.create(ackeeServer, ackeeOpts);
|
const instance = ackeeTracker.create(ackeeServer, ackeeOpts);
|
||||||
instance.record(ackeeDomainId);
|
instance.record(ackeeDomainId);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue