send help
This commit is contained in:
parent
8c000ba0b7
commit
b76e879350
104 changed files with 4260 additions and 142 deletions
21
src/front/utilities/clicker/index.ts
Normal file
21
src/front/utilities/clicker/index.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
const effectTick = new Audio("https://no.ipv4.army/u/Effect_Tick.ogg");
|
||||
|
||||
effectTick.volume = 0.1;
|
||||
|
||||
const whitelistedTags = ["mdui-button", "mdui-icon"];
|
||||
|
||||
document.onclick = (event: MouseEvent) => {
|
||||
const target = event.target as HTMLElement;
|
||||
|
||||
if (!target) return;
|
||||
|
||||
const tagName = target.tagName.toLowerCase();
|
||||
const isWhitelisted = whitelistedTags.some((tag) => tagName.startsWith(tag));
|
||||
|
||||
console.log(tagName, isWhitelisted);
|
||||
|
||||
if (!isWhitelisted) return;
|
||||
|
||||
effectTick.currentTime = 0;
|
||||
effectTick.play();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue