checkbox sfoca chat figuccio

casella di controllo anti spioni

目前為 2023-11-30 提交的版本,檢視 最新版本

// ==UserScript==
// @name          checkbox sfoca chat figuccio
// @namespace     https://gf.qytechs.cn/users/237458
// @version       0.6
// @description   casella di controllo anti spioni
// @author        figuccio
// @match         https://*.facebook.com/*
// @require       https://code.jquery.com/jquery-1.11.0.min.js
// @require       http://code.jquery.com/jquery-latest.js
// @require       https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_addStyle
// @grant         GM_registerMenuCommand
// @icon          https://facebook.com/favicon.ico
// @noframes
// @license        MIT
// ==/UserScript==
function FunctionCheckbox() {
document.getElementById("showHideButton").click();
}
GM_registerMenuCommand("sfoca/on-off",FunctionCheckbox);
////////////////////////////////////////////////////
var $ = window.jQuery;
var j = $.noConflict();
//avvia la funzione dopo che la pagina e stata caricata
$(document).ready(function() {
var body=document.body;
var style="position:fixed; top:-14px;left:300px;z-index:99999;"
var box=document.createElement("div");

box.id="sfoca";
box.style=style;
j(box).draggable();
body.append(box);

 //mostra/nascondi dal menu
function nascondi() {
var box = document.getElementById('sfoca');
box.style.display = ((box.style.display!='none') ? 'none' : 'block');
}
GM_registerMenuCommand("nascondi/mostra box",nascondi);
    //////////////////////////////////////////
    $(document).ready(function() {
    document.getElementById("showHideButton").addEventListener('change', () => {
    GM_setValue("checkboxState", document.getElementById("showHideButton").checked.toString());

    var contactList = document.querySelector(".xwib8y2 ul");
    if (document.getElementById("showHideButton").checked) {contactList.style.filter ="blur(7px)";document.getElementById("showHideButton").value = "Show Chat";}
       else {contactList.style.filter =""; document.getElementById("showHideButton").value = "Hide Chat";}
})
});

    //recupero local storage sfoca chat
document.onreadystatechange = function () {
  if (document.readyState == "complete") {
    if (GM_getValue("checkboxState") === "true") {
      document.getElementById("showHideButton").checked = true;
      var contactList = document.querySelector(".xwib8y2 ul");
      contactList.style.filter ="blur(7px)"; document.getElementById("showHideButton").value = "Show Chat";
    } else {
      document.getElementById("showHideButton").checked = false;
      contactList.style.filter =""; document.getElementById("showHideButton").value = "Hide Chat";
    }
  }
}
setInterval(document.onreadystatechange, 1000);
//setTimeout(document.onreadystatechange, 9000);
   /*
  function blurContacts() {
        const contactList = document.querySelector(".xwib8y2 ul");
        var checkbox = document.getElementById("showHideButton");
        checkbox.checked = true; //casella attivata
        function toggleBlur() {
        if (checkbox.checked) {contactList.style.filter ="blur(7px)";document.getElementById("showHideButton").value = "Show Chat";}
        else {contactList.style.filter =""; document.getElementById("showHideButton").value = "Hide Chat";}
        }

         //Aggiungi il listener di eventi alla casella di controllo
         checkbox.addEventListener("change", toggleBlur);
         toggleBlur()
        }
        */
 //setTimeout(blurContacts, 300);
// setTimeout(blurContacts, 9000);//ripetere
    ////////////////////////////////
  GM_addStyle(`
      #showHideButton{cursor:pointer;margin-right:60px;}

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

      [type=checkbox]:after {
      content: attr(value);
      margin: -2px 19px;
      vertical-align: top;
      display: inline-block;
      white-space:nowrap;
      color:lime;
}

    `);
//elemento html nel div
    box.innerHTML=`
                      </p>
                   <fieldset style="background:#3b3b3b; border: 2px solid red;color:lime;border-radius:7px;text-align:center;width:80px;">
                   <legend>Sfoca Chat </legend>

   <div id=setui>

 <input type="checkbox"  id="showHideButton"     title="Sfoca"   value="Sfoca"/><br>
  </p>
                    </div>
                    </fieldset>
            `;

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址