Background Color figuccio

lista colori

Fra 04.04.2023. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name          Background Color figuccio
// @namespace     https://greasyfork.org/users/237458
// @version       0.9
// @author        figuccio
// @description   lista colori
// @match         *://*/*
// @grant         GM_addStyle
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_registerMenuCommand
// @require       https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @run-at        document-start
// @require       http://code.jquery.com/jquery-latest.js
// @require       https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @icon          https://www.google.com/s2/favicons?domain=google.it
// @require       https://greasyfork.org/scripts/12228/code/setMutationHandler.js
// @noframes
// @license        MIT
// ==/UserScript==
var $b = jQuery.noConflict();
$b(document).ready(function() {
'use strict';
var $ = window.jQuery;
var jb = $.noConflict();
var body=document.body;
var style="position:fixed; top:0px;margin-left:70px;z-index:99999;"
var box=document.createElement("div");

box.id="myback";
box.style=style;
jb(box).draggable();
body.append(box);

function prova(){
 if(myback.style.display = (myback.style.display!='none') ? 'none' : 'block');}
GM_registerMenuCommand("nascondi/mostra time",prova);
///////////////////////////////////////////////////////////////
   //Imposta lo stile CSS degli elementi nel menu
  GM_addStyle(`
  #setuia{width:auto;height:25px; margin-top:0px!important;margin-left:-12px; margin-right:-12px;margin-bottom:0px;border-width:1px;}
  #selectColor{background:#3b3b3b;color:lime;border:1px solid yellow; border-radius:5px;}
            `);

///////////////////////stile colori
$(function(){
$("select").change(function(){
var $selectedOption = $(this).find("option:selected");
$(this).removeAttr("style").attr("style", $selectedOption.attr("style"));
});
});
    /////////////////////////local storage///////////
              //mantiene il colore della lista cambia colore pagina
    $(function() {
    $('#selectColor').change(function() {
    GM_setValue('lista1', this.value);
     ///////////////////////////////////barra facebook
     $("div[aria-label=Facebook][role=navigation]").css("background-color" ,GM_getValue("lista1"));
     ////////////////////////////////////////////////////////////////////////////////
    });
/////////////////////////////////////////////////recupero storage
     if(GM_getValue('lista1')){
     $('#selectColor').val(GM_getValue('lista1'));
     document.getElementById('selectColor').value =GM_getValue('lista1');
     document.body.style.backgroundColor=GM_getValue('lista1');
     ///////////////////////////////////////////////////////barra facebook
     $("div[aria-label=Facebook][role=navigation]").css("background-color" ,GM_getValue("lista1"));
     /////////////////////////////////////////////////////////////////////////////////////////////
    }
});

 //elemento html nel div readonly datatime non fa comparire licona del calendario
    box.innerHTML=`
                      </p>
                     <fieldset style="background:#3b3b3b;border:2px solid red;color:lime;border-radius:7px;text-align:center;width:120px;height:44px;">
                            <legend>Background-Color</legend>
  <div id=setuia>

  <select  id="selectColor" title="Selettore colori" onchange="javascript:document.body.style.backgroundColor=this.value;">
  <option value="">Scegli ...</option>
  <option style="background-color: Purple" value="Purple">Purple</option>
  <option style="background-color: Blue" value="Blue">Blue</option>
  <option style="background-color: Green" value="Green">Green</option>
  <option style="background-color: Orange" value="Orange">Orange</option>
  <option style="background-color: Brown" value="Brown">Brown</option>
  <option style="background-color: Cyan" value="Cyan">Cyan</option>
  <option style="background-color: Gray" value="Gray">Gray</option>
  <option style="background-color: Indigo" value="Indigo">Indigo</option>
  <option style="background-color: Magenta" value="Magenta">Magenta</option>
  <option style="background-color: Pink" value="Pink">Pink</option>
  <option style="background-color: Red" value="Red">Red</option>
  <option style="background-color: Violet" value="Violet">Violet</option>
  <option style="background-color: Yellow" value="Yellow">Yellow</option>
  <option style="background-color: Black" value="Black">Black</option>
  <option style="background-color: lightgreen" value="lightgreen">lightgreen</option>
  <option style="background-color: lightyellow" value="lightyellow">lightyellow</option>
  <option style="background-color: lightblue" value="lightblue">lightblue</option>
  <option style="background-color: lightgrey" value="lightgrey">lightgrey</option>

  </select>

                                                    </p>
                    </div>
                    </fieldset>
            `;

})();