Adds a button to change the page background color
// ==UserScript==
// @name Simple Background Changer
// @namespace https://greasyfork.org/
// @version 1.0
// @description Adds a button to change the page background color
// @author YourName
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const button = document.createElement('button');
button.textContent = 'Change Background';
button.style.position = 'fixed';
button.style.bottom = '20px';
button.style.right = '20px';
button.style.zIndex = '9999';
button.style.padding = '10px';
button.style.cursor = 'pointer';
button.addEventListener('click', () => {
document.body.style.backgroundColor =
'#' + Math.floor(Math.random()*16777215).toString(16);
});
document.body.appendChild(button);
})();