Added traxxx umami tracking.
This commit is contained in:
parent
b5430858f4
commit
1b9d25b37d
|
@ -0,0 +1 @@
|
|||
*.swp
|
12
index.html
12
index.html
|
@ -14,6 +14,8 @@
|
|||
<meta name="apple-mobile-web-app-title" content="Based" />
|
||||
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=.75,maximum-scale=.75,user-scalable=no,interactive-widget=resizes-content">
|
||||
|
||||
<script src="https://anal.traxxx.me/script.js" data-website-id="a288951d-0a6b-411e-b9a0-1d04109a174c" async></script>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--primary: #0ad;
|
||||
|
@ -229,7 +231,7 @@
|
|||
nameInput.addEventListener('input', () => getCode());
|
||||
codeInput.addEventListener('input', () => getName());
|
||||
|
||||
function selectCopy(event) {
|
||||
function selectCopy(event, type) {
|
||||
const text = event.target.value;
|
||||
|
||||
if (!text) {
|
||||
|
@ -245,10 +247,14 @@
|
|||
setTimeout(() => {
|
||||
feedback.classList.add('hidden');
|
||||
}, 1000);
|
||||
|
||||
if (typeof umami !== 'undefined') {
|
||||
umami.track(type, text);
|
||||
}
|
||||
}
|
||||
|
||||
codeOutput.addEventListener('focus', selectCopy);
|
||||
nameOutput.addEventListener('focus', selectCopy);
|
||||
codeOutput.addEventListener('focus', (event) => selectCopy(event, 'encode'));
|
||||
nameOutput.addEventListener('focus', (event) => selectCopy(event, 'decode'));
|
||||
|
||||
nameInput.addEventListener('focus', (event) => event.target.select());
|
||||
codeInput.addEventListener('focus', (event) => event.target.select());
|
||||
|
|
Loading…
Reference in New Issue