Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Forever KELSONDRE
- // @namespace http://tampermonkey.net/
- // @version 1.0
- // @description Change all text to "KELSONDRE,!!!!" every second with a stop button.
- // @author Kelsondre
- // @match *://*/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- let intervalId;
- // Function to replace text with "KELSONDRE,!!!!"
- function kelsondreEverything() {
- const allElements = document.querySelectorAll('*');
- allElements.forEach(el => {
- if (el.childNodes.length === 1 && el.childNodes[0].nodeType === 3) {
- el.childNodes[0].nodeValue = 'KELSONDRE,!!!!';
- }
- });
- }
- // Start replacing text every second
- function startKelsondre() {
- intervalId = setInterval(kelsondreEverything, 1000);
- }
- // Stop the madness
- function stopKelsondre() {
- clearInterval(intervalId);
- alert('KELSONDRE,!!!! has been stopped!');
- }
- // Create a floating stop button
- function createStopButton() {
- const button = document.createElement('button');
- button.innerText = '🛑 Stop KELSONDRE';
- button.style.position = 'fixed';
- button.style.top = '10px';
- button.style.right = '10px';
- button.style.zIndex = '9999';
- button.style.padding = '10px 20px';
- button.style.backgroundColor = '#ff4d4d';
- button.style.color = '#fff';
- button.style.border = 'none';
- button.style.borderRadius = '5px';
- button.style.cursor = 'pointer';
- button.style.fontSize = '14px';
- button.onclick = stopKelsondre;
- document.body.appendChild(button);
- }
- // Initialize
- createStopButton();
- startKelsondre();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement