```js // How to use: copy everything > open tampermonkey extension > dashboard > [+] > paste > save // ==UserScript== // @name DVDoom // @namespace http://tampermonkey.net/ // @version 2024-04-02 // @description 1 Seia 2 Seias 3 Seias 4... // @author (You) // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @namespace rccom // @match *://boards.4chan.org/* // @match *://boards.4channel.org/* // @match *://desuarchive.org/* // @match *://arch.b4k.co/* // @match *://archived.moe/* // @match *://warosu.org/* // @match *://archive.nyafuu.org/* // @grant none // @connect 4chan.org // @connect 4channel.org // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js // ==/UserScript== (function() { const screenHeight = document.body.clientHeight; const screenWidth = document.body.clientWidth; let ALL_SEIAS = []; class DVDOOM { constructor(dvdELement) { this.dvd = dvdELement; this.dvdWidth = dvdELement.clientWidth; this.dvdHeight = dvdELement.clientHeight; this.x = Math.floor(Math.random() * ((screenWidth * 0.99) - this.dvdWidth)); this.y = Math.floor(Math.random() * (screenHeight - this.dvdHeight)); this.dirX = (Math.random()>=0.5)? 1 : -1; this.dirY = (Math.random()>=0.5)? 1 : -1; this.speed = 2; } } function animateSEIAS() { for (let index = 0; index < ALL_SEIAS.length; index++) { let currentSeia = ALL_SEIAS[index]; if (currentSeia.y + currentSeia.dvdHeight >= screenHeight || currentSeia.y < 0) { currentSeia.dirY *= -1; currentSeia.dvd.style["-webkit-filter"] = 'hue-rotate('+Math.floor(Math.random() * 360)+'deg)'; } if (currentSeia.x + currentSeia.dvdWidth >= (screenWidth * 0.99) || currentSeia.x < 0) { currentSeia.dirX *= -1; currentSeia.dvd.style["-webkit-filter"] = 'hue-rotate('+Math.floor(Math.random() * 360)+'deg)'; } currentSeia.x += currentSeia.dirX * currentSeia.speed; currentSeia.y += currentSeia.dirY * currentSeia.speed; currentSeia.dvd.style.left = currentSeia.x + "px"; currentSeia.dvd.style.top = currentSeia.y + "px"; } window.requestAnimationFrame(animateSEIAS); } function addNewSeia(seiaCount) { document.getElementsByClassName("thread")[0].insertAdjacentHTML("afterBegin", `
`.repeat(seiaCount)); let dvds = document.getElementsByClassName("doomvdoom"); for (let index = 0; index < dvds.length; index++) { let olderSeia = ALL_SEIAS[index]; if (olderSeia === undefined) { ALL_SEIAS.push(new DVDOOM(dvds[index])); } else { olderSeia.dvd = dvds[index]; } } } animateSEIAS(); document.getElementsByClassName("navLinks desktop")[0].innerHTML += ["[+1 Seia]"]; document.getElementsByClassName("navLinks desktop")[0].innerHTML += ["[+10 Seia]"]; document.getElementsByClassName("navLinks desktop")[0].innerHTML += ["[+100 Seia]"]; $(document).on('click', '#addSeia1', () => addNewSeia(1)); $(document).on('click', '#addSeia10', () => addNewSeia(10)); $(document).on('click', '#addSeia100', () => addNewSeia(100)); })(); ```