new Facebook figuccio

new facebook color 2024

目前為 2024-03-25 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          new Facebook figuccio
// @namespace     https://greasyfork.org/users/237458
// @version       32.9
// @author        figuccio
// @description   new facebook color 2024
// @match         https://*.facebook.com/*
// @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://facebook.com/favicon.ico
// @require       https://greasyfork.org/scripts/12228/code/setMutationHandler.js
// @noframes
// @license        MIT
// ==/UserScript==
(function() {
    'use strict';
    //2 funzioni in una dopo che la pagina e carica. clickseemore + no login recent
    var $ = window.jQuery;//$ evita triangolo giallo
    $(document).ready(function() {
    window.setInterval(clickseemore,5000);
    window.setTimeout(clearRecentLogins,100);
    //multi lingue funzione espandi seemore Altro...
    function clickseemore(){
        var adbutts=document.querySelectorAll('.x1iyjqo2');
        for(var i=0;i<adbutts.length;i++) {
            if (adbutts[i].textContent=='Altro...' || adbutts[i].textContent === 'See more'|| adbutts[i].textContent === 'Ver más' || adbutts[i].textContent === 'Afficher la suite' || adbutts[i].textContent === 'Mehr ansehen'){
                adbutts[i].click();
                //break;//togliendo questo espande tutti e 2 Altro...
            }
        }
    }
    //no login recent
    function clearRecentLogins() {
        if(!document.querySelectorAll('.removableItem a[role="button"][ajaxify^="/login/device-based"]').length) {
            return;
        }
        var x=document.querySelectorAll('.removableItem a[role="button"][ajaxify^="/login/device-based"]');
        for(var i=0;i<x.length;i++) {
            x[i].click();
        }
    }
});
//////////////////////////////////////////////////////////////////////
console.log('Start RemoveAllSponsored Facebook');

function getVisibleContent(e) {
  var t = e.innerText.replaceAll("\n","");

  var children = e.childNodes;
  while (children.length == 1) children = children[0].childNodes;
  var spanBottom = e.getBoundingClientRect().bottom;
  children = Array.from(children).filter((c) => c.getBoundingClientRect && c.getBoundingClientRect().top <= spanBottom);
  var a = [];
  for (var c of children) {
    var order = getComputedStyle(c).order;
    if (order && window.getComputedStyle(c).display !== 'none') {
      a[order] = c.innerText;
    }
  }
  if (a.length == 0) a = t.split();
  var intext = a.join().replaceAll(",","").replaceAll("\n","");
  if (intext == "") intext = t;
  return intext;
}

function RemoveAllSponsored()
{
  setTimeout(RemoveAllSponsored, 750);

  //supporta più lingue se c'è interesse.
  const keywords = [ /Sponsored/,/Commandvit/, /Sponsori/,/Reklamo/, /Publicid/,/Gesponser/, /Patrocinado/,/sugerisdos/, /贊助/, /RememberPassword/];
  var nbrRemovedAds = 0;
  var nbrSuggestedRemoved = 0;

  if (document.URL.match(/facebook.com\/*(\?.*)*/)) {

  }

  //Vecchio stile
  var elts = Array.from(document.getElementsByTagName('span'));
  elts = elts.filter((e) => {var br = e.getBoundingClientRect(); return br.bottom >= 0 && br.top <= window.innerHeight + 1000 && !e.style.display});

  var nbrSpans = elts.length;
  for (var i = elts.length - 1; i >= 0; --i)
  {
    var e = elts[i];
    var boundingRect = e.getBoundingClientRect();
    if (boundingRect.width == 0 || boundingRect.height == 0) continue; // Not visible

    var t = e.innerText;
    if (t === 'In base alla tua attività recente' || t === 'Post suggerito di un gruppo pubblico' || t === 'Giuseppe, ecco alcuni gruppi che ti potrebbero piacere' || t === 'Articoli correlati' || t === 'Persone che potresti conoscere' || t === 'Segui' || t === 'Sponsorizzato' || t === 'Follow' || t === 'Remember Password' || t === 'Reel e video brevi' || t === 'Suggested for you' || t === 'People You May Know' || t==='Contenuto suggerito per te' || t==='Reel' || t === 'Memorizza password' || t === 'Iscriviti' ||
       t.match(/groups you might like/) || t.match(/groups suggested just for you/)) {
      let parent = e.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
      while (parent.getBoundingClientRect().height < 90) parent = parent.parentElement;
      console.log('- Removing Fb suggestion h=', parent.getBoundingClientRect().height, ' reason=', t, ' text=', parent.innerText.replaceAll("\n", "  ").substring(0, 50));

      parent.style.display = "none";
      e.style.display = "none";
      ++nbrSuggestedRemoved;
      continue;
    }
    if (e.parentElement.tagName != 'SPAN') {
      continue;
    }
      //////////////////////////////////////nuovo
      var intext = getVisibleContent(e);
    if (intext.length > 0) {
      for (var k of keywords) {
        if (intext.match(k)) {
          let parent = e.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement
              .parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
          parent.style.display = "none";
          e.style.display = "none";
          ++nbrRemovedAds;
          console.log('- Removing Fb ads ', i, '[', parent.innerText.replaceAll("\n", "  ").substring(0, 200), '] matching ', k, ' at ', intext);
          break;
        }
      }
    }
  }
}

setTimeout(RemoveAllSponsored, 1000);
///////////////////////////////////////////////////////////////
    /////////////////////////////
setInterval(gtfo, 500);
var $z = window.jQuery;//$z evita triangolo giallo
function gtfo() {
$z("span:contains('Reel e video brevi')").closest('[data-pagelet*="FeedUnit"]').hide();//25-12-2023
$z("span:contains('Reels')").closest('[data-pagelet*="FeedUnit"]').hide();//25-12-2023  toglie reel condivisi dagli amici
}
    /////////////////////////////////////////////////////////////////////////////////////////////////////
  //reels e brevi video su alcuni profili
GM_addStyle('a[href*="/reel/"],li>div>a[href*="/reel/"]{display:none !important}');//funziona su alcuni profili
                  //reels
GM_addStyle('.xquyuld.x10wlt62.x6ikm8r.xh8yej3.xt3gfkd.xu5ydu1.xdney7k.x1qpq9i9.x2bj2ny.x1ja2u2z.x1n2onr6.x9f619 > .x10wlt62.x6ikm8r{display:none !important}');//funziona su alcuni profili
   ////////////////////////////////////////////////////////////////////////////////
//accetta tutti cookie facebook
GM_addStyle('div[data-cookiebanner="banner"],.hasCookieBanner #root ~ .accelerate,body[tabindex] > div > #viewport > div:first-child:not(#MChromeHeader),div[data-testid="cookie-policy-dialog"],div[data-testid="cookie-policy-manage-dialog"]{display:none !important}.uiLayer[data-testid="cookie-policy-banner"]{display:none !important}.hasCookieBanner > div{position:static !important}');

                      //remove sponsorizzato toglie tutte e 2
GM_addStyle('div[role="complementary"] > div[class] > div[class] > div[class] span > div > div:not([aria-label]):not([data-visualcompletion]):has(> div[class] > div[class] div[class] > a[href^="https://l."][href*="facebook.com/l.php?u="][target="_blank"]) {display:none!important}');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //immagine profilo bordo colorato
GM_addStyle('div[aria-label="Page profile photo"] circle, a[aria-label*="profile photo"] circle, div[aria-label="Page profile photo"] mask, a[aria-label*="profile photo"] mask {display:} svg[aria-label]>mask,svg[aria-label] circle,svg[style="height: 40px; width: 40px;"]>mask,svg[style="height: 40px; width: 40px; "] circle, svg[style="height:40px;width:40px"]>mask,svg[style="height:40px;width:40px"] {border-radius:22px!important;border:2px solid #c471ed!important;}');

//cerchi notifiche messaggi ecc
GM_addStyle('.x1qhmfi1{border-radius:22px!important;border:2px solid #c471ed!important;}');
    //////////////////////
 //nasconde pop up notifica a sinistra quando si gioca
GM_addStyle('ul[data-gt*=\"\\\"ref\\\":\\\"beeper\\\"\"] {display:none !important;}');//non inserire in un unico blocco
 //nasconde pop up notifica a sinistra sulla home
GM_addStyle('div[role="complementary"][aria-labelledby] {display:none!important;}');//non inserire in un unico blocco
/////////////////////////////////////////////////////////////////////////////////////////////////
    // Raggruppa tutti gli stili in un unico blocco
GM_addStyle(`
    /* Nasconde elementi del menu di navigazione di Facebook watch marketplace groups gaming  */
    div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(2),
    div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(3),
    div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(4),
    div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(5) {
        display: none !important;
    }


    /* Nasconde il popup "Ti piace questo gioco?" */
    ._3mqg {
        display: none !important;
    }

`);
////////////////////////////////////crea una storia dalla sez centrale rimosse
     // Funzione per nascondere la sezione di creazione della storia
    function hideStoryCreation() {
        var storyComposer = document.querySelector('[aria-label="Storie"]');
        if (storyComposer) {
            storyComposer.style.display = 'none';
        }
    }

    // Nascondi la sezione di creazione della storia al caricamento della pagina
    hideStoryCreation();

    // Monitora le modifiche nel DOM per nascondere la sezione anche se viene aggiunta in seguito tramite AJAX
    var observer = new MutationObserver(function(mutationsList, observer) {
        for(var mutation of mutationsList) {
            if (mutation.type === 'childList') {
                hideStoryCreation();
            }
        }
    });

    observer.observe(document.body, { attributes: false, childList: true, subtree: true });
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //sidebar sinistra visibile su tutti gli altri account luglio 2023
GM_addStyle('div[role="banner"]+div div[role="navigation"]{border-radius:14px;border:2px solid lime!important;margin-top:0px;font-family:monospace!important;}');
GM_addStyle('div[role="banner"]+div div[role="navigation"]:hover{background-image: url(https://media2.giphy.com/media/asG02gUfDyIxdODF76/giphy.gif);background-blend-mode: overlay;}');
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    //sidebar destra #765414
GM_addStyle('div[role="complementary"]{border-radius:14px;border:2px solid red!important;margin-top:4px!important;font-family:Raleway!important;}');
GM_addStyle('div[role="complementary"]:hover{background-image: url(https://media2.giphy.com/media/asG02gUfDyIxdODF76/giphy.gif);background-blend-mode: overlay;}');
//////////////////////////////////////////////////////////
//ha cosa stai pensando bordo
GM_addStyle('.xz9dl7a.x1swvt13.x1pi30zi.x1a8lsjc.x1a02dak.x78zum5.x6s0dn4{border-radius:14px;border:2px solid red!important;}');
//bordo verde sui feed
GM_addStyle('.x6o7n8i.x1unhpq9.x1hc1fzr > div{border-radius:14px;border:2px solid lime!important;margin-top:4px!important;}');
  //tasto menu accanto ha messaggi febbraio 2024
GM_addStyle('.x9e5oc1 > .x1qrby5j.x7ja8zs.x1t2pt76.x1lytzrv.xedcshv.xarpa2k.x3igimt.x12ejxvf.xaigb6o.x1beo9mf.xv2umb2.x1jfb8zj.x1h9r5lt.x1h91t0o.x4k7w5x .x1qhmfi1.x100vrsf.x1vqgdyp.x1n2onr6.xkhd6sd.x18d9i69.x4uap5.xexx8yu.xl56j7k.x78zum5.x9f619.xm0m39n.x1qhh985.xcfux6l.x972fbf.xww2gxu.x18nykt9.xudhj91.x14yjl9h.x6s0dn4.x1a2a7pz.x1lku1pv.x87ps6o.xggy1nq.x1hl2dhg.x16tdsg8.x1mh8g0r.xat24cr.x11i5rnm.xdj266r.xe8uvvx.x1ypdohk.x17r0tee.x1sy0etr.xd10rxx.x1ejq31n.x1i10hfl{display:none!important;}');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//var $ = window.jQuery;//$ evita triangolo giallo (qui e disattivato perche ce gia allinizio del codice)
$(document).ready(function() {
//feed piu grandi compreso ha cosa stai pensando
function addStyleByClass(className, style) {
        const elements = document.getElementsByClassName(className);
        for (const element of elements) {
            element.setAttribute('style', style);
        }
    }
    function checkAppliedWidth(className, width) {
        const elements = document.getElementsByClassName(className);
        return Array.from(elements).some(element => element.style.width === width);
    }

   function adjustWidths() {
        const widthsAndClasses = [
            {className:'x193iq5w xvue9z xq1tmr x1ceravr', width:'1000px'},
        ];
       widthsAndClasses.forEach(({ className, width }) => {
            if (!checkAppliedWidth(className, width)) {
                addStyleByClass(className, `width: ${width};`);
            }
        });
    }

    const observer = new MutationObserver(adjustWidths);
    observer.observe(document.body, { childList: true, subtree: true });
    window.addEventListener('load', adjustWidths);
        });

////////////////////color picker///////////
const $f = window.jQuery;//$f evita triangolo giallo
const jf = $f.noConflict();
//avvia la funzione dopo che la pagina e stata caricata
$f(document).ready(function() {
    /////////////////////////
     // Aggiungi la funzione per il trascinamento limitato allo schermo
function makeDraggableLimited(element) {
    element.draggable({
        containment: "window",
        stop: function(event, ui) {
            // Memorizza la posizione dopo il trascinamento
            GM_setValue('boxPosition', JSON.stringify(ui.position));//importante
        }
    });
}
////////////////////////////
const body=document.body;
const style="position:fixed; top:-3px;left:720px;z-index:99999;"
const box=document.createElement("div");

box.id="myMenu";
box.style=style;
jf(box).draggable();
body.append(box);
     // Ripristina la posizione salvata se presente
const savedPosition = GM_getValue('boxPosition');
if (savedPosition) {
    const parsedPosition = JSON.parse(savedPosition);
    $(box).css({ top: parsedPosition.top, left: parsedPosition.left });
}
    ////////////////////////////////////////////marzo 2024
     // Rendi l'elemento trascinabile con limitazioni di schermo
    makeDraggableLimited($(box));
////////////////////////////audio effetto sonoro quando si clicca sulla x rossa
        //suono elettronico
var Sound = new Audio("data:audio/mp3;base64,SUQzAwAAAAABTVRYWFgAAAARAAAAbWFqb3JfYnJhbmQAZGFzaFRYWFgAAAAXAAAAU29mdHdhcmUATGF2ZjU1LjMzLjEwMFRYWFgAAAAbAAAAY29tcGF0aWJsZV9icmFuZHMAaXNvNm1wNDFUWFhYAAAAEAAAAG1pbm9yX3ZlcnNpb24AMFRJVDIAAAAOAAAAU0tVTEwgVFJVTVBFVENPTU0AAAAwAAAAAAAAAGh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZVZyWWJLQnJJN2//+5AEAAAAAAAAAAAA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abKdpp///////6qv2xVVTEFNRTMuOTkuM1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uSBG8P8VgAKeghGABG4iSlDGOAQAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==");
/////////////////////effetto disolvenza box color picker al caricamento pagina
document.getElementById("myMenu").style.display = "none";
$f("#myMenu").fadeIn(5000);
      //mostra/nascondi dal menu
function prova() {
    var menu = document.getElementById("myMenu");
    if (menu.style.display === 'none') {
        $f(menu).fadeIn(5000);
    } else {
        $f(menu).fadeOut(2000);
    }
}
GM_registerMenuCommand("nascondi/mostra box",prova);
///////////////////////////////////////////////////////////////
 function logout() {
 box.addEventListener("click", function(e) {e.preventDefault(); document.querySelector('form[action^="/logout.php?"').submit(); e.target.innerHTML='<img src="//www.facebook.com/images/loaders/indicator_blue_small.gif"/>'},false);
}
/////////////////////////////////////////////////////////////////
    const userdata = {color:'figuccio'}
    var mycolor;//dichiarare la variabile colore

    //imposta la variabile colore
    if(/^#+\w+$/.test(GM_getValue(userdata.color))){mycolor = GM_getValue(userdata.color);}
    else {mycolor="#980000";}

  // salvare i dati personalizzati
    window.setInterval(saveSetting,3000);
    function saveSetting() {GM_setValue(userdata.color, mycolor);
    $f('div[role="banner"]+div div[role="navigation"], div[role="complementary"], div[aria-label="Facebook"][role="navigation"]').css("background-color",mycolor);
          }
///////////////////////////////////sfoca chat $f evita triangolo giallo
 function savecheckbox() {
 GM_setValue("checkboxState", document.getElementById("checkbox1").checked.toString());
 var chat = document.querySelector(".xwib8y2 ul");
 if (document.getElementById("checkbox1").checked) {chat.style.filter ="blur(7px)";document.getElementById("checkbox1").value = "Show Chat😃";}
 else {chat.style.filter =""; document.getElementById("checkbox1").value = "Hide Chat😩";}
    }
//////////////////////////////////////////////////////////////////////////////////////////////////////
    $f(document).ready(function() {
    $f("#checkbox1").change(function(){
    GM_setValue("checkboxState", document.getElementById("checkbox1").checked.toString());
    savecheckbox();
})
});
////////////////////////////////////////////////////////////////gennaio 2024
    //recupero local storage sfoca chat
  document.onreadystatechange = function() {
  if (document.readyState == "complete") {
  if (GM_getValue("checkboxState") === "true") {

      $f("#checkbox1").prop("checked", true);
         savecheckbox();
       }
       }
       }

          //sfoca chat gennaio 2024
 var observer = new MutationObserver(function(mutations) {
 mutations.forEach(function(mutation) {
 document.onreadystatechange();
        });
    });
 observer.observe(document, {childList:true, subtree:true})
    /////////////////////////////
      //Imposta lo stile css degli elementi nel menu
      GM_addStyle(`
      #myMenu {font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', Arial, sans-serif;font-size:14px;z-index:2147483648;}

      #myMenu .button {padding: 3px 6px;line-height:16px;margin-top:6px;display:inline-block;}

      #colorspan {margin-left:0px; margin-bottom:-19px;color:lime;background-color:brown;border:1px solid yellow;border-radius:5px;cursor:pointer;}

      #setuiface{width:auto;height:25px; margin-top:-6px;margin-left:-4px; margin-right:-4px;margin-bottom:0px;border-width:1px;color:lime;}

      #colorinput{margin-left:4px; margin-top:12px; background-color:#3b3b3b; color:red;border:1px solid yellow;border-radius:5px;height:20px;cursor:pointer;}

      #demo{border:1px solid yellow;border-radius:5px;cursor:pointer;text-align:center;margin-top:-15px;margin-left:86px;font-size:14px;width:max-content;}

      input[type=checkbox] {accent-color:red;}

      [type=checkbox]:after {
      content: attr(value);
      margin: -2px 22px;
      vertical-align:top;
      display: ;
      white-space:nowrap;
      color:lime;
      background:brown;
      cursor:pointer; /*sulla scritta*/
}

     /* bordo casella */
      input[type="checkbox"]{
      outline: 3px solid lime;
}

     /*ingrandisce checkbox */
      input[type="checkbox"] {
      cursor:pointer; /*sulla checkbox*/
      width:18px;
      height:18px;
}


     /*se cliccata*/
      input[type="checkbox"]:checked {
      outline: 3px solid yellow;
}

    /*se cliccata colore testo*/
      input[type=checkbox]:checked::after{
      content: attr(value);
      margin: -2px 22px;
      vertical-align:top;
      display: ;
      white-space:nowrap;
      color:red;
      background:aquamarine;
      cursor:pointer; /*sulla scritta*/
}

    `);
///////////////////////clock
setInterval(myTimer,70);
function myTimer() {
var d = new Date();
var t = d.toLocaleTimeString();
var mm = d.getMilliseconds();//millisecondi settembre 2023
    ////////////////short  long
var date = new Date().toLocaleString('it', {'weekday': 'short', 'month': '2-digit', 'day': '2-digit','year':'numeric'});
document.getElementById("demo").innerHTML =date +" "+ t +":"+ mm;
}
//elemento html . width:399px evita che spostandolo hai lati cambi di dimensioni/ </button> Color<lasciare distanziato cosi
 box.innerHTML=`
<fieldset style="background:#3b3b3b;border:2px solid red;color:lime;border-radius:7px;text-align:left;height:39px;width:399px;">
                       <div id="demo"  title="Data-ora" ></div>
                       <legend>Time</legend>
 <div id=setuiface>

Hex <button id="colorspan"title="Hex value">${mycolor}</button> Color<input type="color" list="colors" id="colorinput" value="${mycolor}" title="Color picker">
<span class="button" title="Chiudi" id='close'    style="background-color:red; color:lime;border:1px solid yellow;border-radius:50%;cursor:pointer;">X</span>
<span class="button" title="Esci"   id='logout'   style="background-color:red;border:1px solid yellow;border-radius:3px;cursor:pointer;">Logout</span>

<input type="checkbox" id="checkbox1"  title="Sfoca" value="Hide Chat😩">

<datalist id="colors">


		</datalist>
                    </fieldset>
    `;

        //Una serie di elementi get
        var colorspan=document.querySelector('#colorspan');
        var colorinput=document.querySelector('#colorinput');
        var MenuClose=document.querySelector('#close');
        var Menulogout=document.querySelector('#logout');//funzione logout
    //////////////////////////////////////////////////////////////////////////////////
                    //fa vedere la modifica colore
    colorinput.addEventListener('input', function(event){colorChange(event)},false);
    $f('div[role="banner"]+div div[role="navigation"], div[role="complementary"], div[aria-label="Facebook"][role="navigation"]').css("background-color",mycolor);
    //////////////////////////////////////////////////////////////////////////////////
                      //chiude dalla x rossa
        MenuClose.addEventListener('click',prova,false);
                      //richiama effetto sonoro chiudendo con la x rossa
        MenuClose.onclick = function() {Sound.play();};
        Menulogout.addEventListener('click',logout,false);//funzione logout
    /////////////////////////////////////////////////////////////////////////
    function colorChange (e) {
    mycolor = e.target.value;
    colorspan.innerHTML=e.target.value;
    document.getElementById('colorspan').value =mycolor;//value hex
      //colore immediatamente visibile
    $f('div[role="banner"]+div div[role="navigation"], div[role="complementary"], div[aria-label="Facebook"][role="navigation"]').css("background-color",mycolor);
        GM_setValue(userdata.color, mycolor);
        }

   document.getElementById('colorspan').value =mycolor;//value hex
   document.getElementById('colorinput').value =mycolor;//il colore del selettore e uguale a quello della pagina

})();//


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