Compare commits
2 commits
e2a61a8c68
...
89b004c262
Author | SHA1 | Date | |
---|---|---|---|
89b004c262 | |||
b322ef9759 |
1 changed files with 14 additions and 9 deletions
|
@ -6,22 +6,27 @@
|
|||
const noBtn = ackeeBanner.querySelector('.negative');
|
||||
const confirmKey = 'ackeeDetailed';
|
||||
|
||||
yesBtn.addEventListener('click', () => localStorage.setItem(confirmKey, true));
|
||||
const ackeeServer = 'https://ackee.sebin-nyshkim.net';
|
||||
const ackeeDomainId = 'e60cc3de-916c-424c-ac6e-2fd43d41e240';
|
||||
const ackeeOpts = { detailed: true };
|
||||
|
||||
const record = (server, domainId, options) => {
|
||||
const instance = ackeeTracker.create(server, options);
|
||||
instance.record(domainId);
|
||||
};
|
||||
|
||||
yesBtn.addEventListener('click', () => {
|
||||
localStorage.setItem(confirmKey, true);
|
||||
record(ackeeServer, ackeeDomainId, ackeeOpts);
|
||||
});
|
||||
noBtn.addEventListener('click', () => localStorage.setItem(confirmKey, false));
|
||||
|
||||
if (localStorage.getItem(confirmKey) === null) {
|
||||
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') {
|
||||
const instance = ackeeTracker.create(ackeeServer, ackeeOpts);
|
||||
instance.record(ackeeDomainId);
|
||||
record(ackeeServer, ackeeDomainId, ackeeOpts);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue