Greasy Fork is available in English.

ColorPicker barra facebook

cambio colore facebook

// ==UserScript==
// @name          ColorPicker barra facebook
// @namespace     https://greasyfork.org/users/237458
// @version       11.8
// @description   cambio colore facebook
// @author        figuccio
// @license       MIT
// @match         https://*.facebook.com/*
// @icon          https://s3.bmp.ovh/imgs/2022/04/19/8dbde08bece5b798.png
// @noframes
// @grant         GM_addStyle
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_registerMenuCommand
// @require       https://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==
(function () {
  'use strict';
  var $ = window.jQuery;
  $(document).ready(function() {
    var body=document.getElementsByTagName("body")[0];
    var container=document.createElement("div");
    container.style="top:50%;position:fixed;right:5px;";
    body.append(container);
    container.innerHTML=`
      <fieldset style="border: 2px solid red; border-radius:6px; padding:10px;background:#ffc800">
         <legend style="color: green;">Color Picker</legend>
        <input type="color" list="colors" id="_input-color" title="Color picker">
        <input type="text" id="hexcolor" title="Hex color" style="margin-top: 5px;">
      </fieldset>
    `;

    // Imposta lo stile CSS degli elementi nel menu
    GM_addStyle(`
      #_input-color {z-index:999999999999; border:2px solid yellow; border-radius:6px; cursor:pointer;}
      #hexcolor {z-index:999999999999; color:green; border:2px solid green; border-radius:6px; cursor:pointer;}
    `);

    // Input casella hex
    $('#_input-color').on('input', function() {
      $('#hexcolor').val(this.value);
      GM_setValue('bg', this.value);
      $('body,#blueBarDOMInspector>div, #blueBarDOMInspector div[role="banner"], #fb2k_pagelet_bluebar>#blueBarDOMInspector>div>div, div[aria-label="Facebook"][role="navigation"]').css('background-color', GM_getValue("bg"));
    });
  // Mostra/Nascondi menu
   function nascosto() {
 if(container.style.display = (container.style.display!='none') ? 'none' : 'block');}
 GM_registerMenuCommand("mostra pulsante/nascondi",nascosto);
    // Storage
    if (GM_getValue('bg') !== null) {
      document.getElementById('hexcolor').value = GM_getValue('bg');
      document.getElementById('_input-color').value = GM_getValue('bg');
      $('body,#blueBarDOMInspector>div, #blueBarDOMInspector div[role="banner"], #fb2k_pagelet_bluebar>#blueBarDOMInspector>div>div, div[aria-label="Facebook"][role="navigation"]').css('background-color', GM_getValue("bg"));
    }
  });
})();