lets go

pog

  1. // ==UserScript==
  2. // @name lets go
  3. // @namespace http://tampermonkey.net/
  4. // @version 1
  5. // @description pog
  6. // @author Special Kid
  7. // @include http://*
  8. // @include https://*
  9. // @grant none
  10. // ==/UserScript==
  11. var Time = 0.05; // time in seconds, original is 0.05
  12.  
  13. var i;
  14. var x = document.getElementsByTagName("*");
  15. function secondsToMilli(s) {
  16. return s * 1000;
  17. }
  18. function getRandomInt(min, max) {
  19. min = Math.ceil(min);
  20. max = Math.floor(max);
  21. return Math.floor(Math.random() * (max - min + 1)) + min;
  22. }
  23. function blues() {
  24. for (i = 0; i < x.length; i++) {
  25. x[i].style.backgroundColor = "hsl(" + ((x.length * getRandomInt(0, 320)) * i / x.length) + ",80%,50%)";
  26. }
  27. }
  28. setInterval(blues, secondsToMilli(Time));