colore barra facebook ramdom figuccio

cambia colori random

目前为 2022-08-02 提交的版本。查看 最新版本

// ==UserScript==
// @name          colore barra facebook ramdom figuccio
// @namespace     https://greasyfork.org/users/237458
// @version       0.4
// @author        figuccio
// @description   cambia  colori random
// @match         https://*.facebook.com/*
// @match         https://*.facebook.com/me/*
// @grant         GM_addStyle
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_registerMenuCommand
// @run-at        document start
// @require       https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @license        MIT
// @noframes
// ==/UserScript==
(function() {
    'use strict';
     ////////////////////////////////////
    var Button = document.createElement('button');
    document.getElementsByTagName('body')[0].appendChild(Button);
    Button.setAttribute ('id', 'prova');
    Button.setAttribute ('title', 'cambio colore');
    Button.setAttribute('class', 'test');
    Button.style = "position:absolute;top:370px;right:0px;z-index:9999999999999999999999;background-color:yellow;color:black;padding:5px;border-radius: 5px;border-color:green;";
    Button.innerHTML = "cambia colore fb random";
 ////////////////////////////////////////////////////body,

 $(document).ready(function() {
 $('button').click(function() {
 var colors = ["blue", "green", "violet", "red","orange","purple","pink","Yellow","Cyan","#0099cc","#587b2e","#990000","#000000","#1C8200","#987baa","#981890","#AA8971","#1987FC","#99081E"];
                var body = Math.floor(Math.random() * colors.length);
                var selectedcolor = colors[body];
                $(".thodolrn,._2t-a").css("background",selectedcolor);
                Button.innerHTML = "&nbsp;cambio colore <br/>&nbsp;" + selectedcolor;
            });
});


////////////////////////////////
    })();

 function myFunctionnasc() {
 if(prova.style.display = (prova.style.display!='none') ? 'none' : 'block');}

GM_registerMenuCommand("mostra pulsante/nascondi",myFunctionnasc);
/////////////////////////////////////////