Back to Repository

Rainbow Background

0 upvotes
By Default Upload
After page load (document_end)

Description

Make the site have a rainbow background

Match Pattern

<all_urls>

Script Code

(function() {
  let hue = 0;

  (function rainbowBackground() {
    document.body.style.backgroundColor = `hsl(${hue}, 100%, 50%)`;
    hue = (hue + 1) % 360; // Loop back after reaching 360
    requestAnimationFrame(rainbowBackground);
  })();
})();
Install requires the InjectJS Chrome extension. Scripts run only on sites matching the pattern above. Review code before installing any community script.