A JS script that starts to play discord ping/call sounds after site inactivity
Easy peasy!
- Add the script to your site:
<script src="https://cdn.jsdelivr.net/gh/kammt/dis-troll.js/dis-troll.js"></script>
- Wait for happy customer reviews
Any click or scroll by the user will reset a timer ranging from 4 and 10 minutes (the exact time is chosen at random). When the user stops interacting with the site, the timer will eventually run out, and discord sounds will start to haunt them.
Sure! Do the following:
- Add the script, with autosetup disabled:
<script src="https://cdn.jsdelivr.net/gh/kammt/dis-troll.js/dis-troll.js" data-autosetup="false"></script>
- Every time you want to trigger the timer, call the
startDistrollTimer
function - Wait for happy customer reviews
Well, if you interacted with the website, then playing content is allowed (e.g. playing a video by pressing the play-button). As the "sound-playing" is a direct result of a website interaction (with a delay), it is not blocked by default.
This was tested on Firefox and Brave. If you find incompatibilities, feel free to report them!
data-min-minutes
- the minimum time that elapses until a timer runs outdata-max-minutes
- well.. the maximum time that elapses until a timer runs outdata-autosetup
- whether to run the autosetup or not
- The MemeAssembly documentation (https://memeassembly.wtf/)
- The Artemgus Generator by xarantolus (https://artemgus.010.one/)
- ..you? If you use this script on your site, let me know and I'll add you to this wall of fame!
When you use dis-troll.js, you trust me that this script does not do anything malicious. This is something you can verify from the source code.
However, since it is possible to update the script, I could sneak in anything I want, which would then be executed on the computer of every visitor of your website. I will not do malicious updates, but you can't truly trust me (and any publisher of auto-updating software) on that.
If you want to be 100% sure and without needing to trust me, you have two options:
- Download the current version of the script and embed this file into your website
- Pin a specific version using jsdelivr, e.g.
<script src="https://cdn.jsdelivr.net/gh/kammt/dis-troll.js@v1.0.1/dis-troll.js"></script>