Scratch Wiper & Redirector

Wipes the Scratch front page and changes the username to "666". Redirects other Scratch pages to a specific URL.

  1. // ==UserScript==
  2. // @name Scratch Wiper & Redirector
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Wipes the Scratch front page and changes the username to "666". Redirects other Scratch pages to a specific URL.
  6. // @author You
  7. // @match *://scratch.mit.edu/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Check if on the Scratch homepage
  15. if (window.location.pathname === "/") {
  16. // Wipe the whole front page
  17. document.body.innerHTML = "";
  18.  
  19. // Create a fake username display
  20. let username = document.createElement("div");
  21. username.textContent = "Logged in as: 666";
  22. username.style.position = "fixed";
  23. username.style.top = "10px";
  24. username.style.left = "10px";
  25. username.style.background = "black";
  26. username.style.color = "red";
  27. username.style.padding = "10px";
  28. username.style.fontSize = "20px";
  29. username.style.fontWeight = "bold";
  30. document.body.appendChild(username);
  31. } else {
  32. // Redirect any other page to the specified URL
  33. window.location.href = "https://scratch.mit.edu/666";
  34. }
  35. })();