what i mean is, every time i've tried using JS it never works for some reason. and honestly i'm kinda hopeless at JavaScript anyways...
one of which i took from the source code of someone's site, in which it's a button to pause all the GIFs on the site. i've wanted it for accessibility purposes, especially since sometimes i myself wanna look at it without being overstimulated, plus in general i've been looking to make my site more accessible! ( ˙꒳˙)
but nope, it doesn't work at all!!
so i've put the <script> thing in both the way they did it, and then into the header, same thing.
i'm hosting on Nekoweb so i'm starting to second-guess myself.
the code for said button is the exact same as the original's:
<button onclick="freezegifs()" type="button">Pause gifs</button>
and this is the <script> part:
<script src="https://cynderthekitsune.nekoweb.org/meta%2Fjs/pause.js"></script>
and this is the code in the JavaScript file it's the same as the original:
function freezegifs(){var e=document.querySelectorAll(".freeze img, img.freeze");document.querySelector("html").classList.add("pausebg");for(var r=0;r<e.length;r++)e[r].src=e[r].src.slice(0,-3)+"png"}function resumegifs(){var e=document.querySelectorAll(".freeze img, img.freeze");document.querySelector("html").classList.remove("pausebg");for(var r=0;r<e.length;r++)e[r].src=e[r].src.slice(0,-3)+"gif"}
the exact same as the original's.
don't worry the original's was under Public Domain and she was fine with this (;^_^)
sorry i'm just really stressed at the moment... well, it's okay. i'm just new to JavaScript and have no idea what i'm doing but i think it's right.
the button's in the sidebar, and it's on this link (that i've tried it on):
https://cynderthekitsune.nekoweb.org/buttons