您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
color picker allinterno barra facebook
当前为
// ==UserScript== // @name new picker barra Facebook figuccio // @namespace https://gf.qytechs.cn/users/237458 // @version 0.7 // @author figuccio // @description color picker allinterno barra facebook // @match https://*.facebook.com/* // @match https://*.facebook.com/me/* // @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 // @icon https://www.google.com/s2/favicons?domain=facebook.com // @require https://gf.qytechs.cn/scripts/12228/code/setMutationHandler.js // @noframes // @license MIT // ==/UserScript== (function() { 'use strict'; var $ = window.jQuery; $(document).ready(function() { $('<input type="button" id="hexcolor" value="${mycolor}" title="Hex color"></input>').appendTo('body'); $('#hexcolor').css({ 'z-index':'999999999999', 'position': 'fixed','top': 13,'right': 425, color:'darkred', 'border':'2px solid green', 'border-radius': '6px',}); //Creazione del colorPicker $('<input type="color" list="colors" value="${mycolor}" id="colorinput" title="color picker">').appendTo('body'); $('#colorinput').css({ 'z-index':'999999999999', 'position': 'fixed','top': 10,'right': 330, 'border':'2px solid yellow', 'border-radius': '6px',}); //////////////////////////////////////////////////////////////////////////////////////////////////casella hex $('#colorinput').on('input', function() {$('#hexcolor').val(this.value);}); ////////////////////////////////////////////////////////////////////////////////////////////// //dati per la conservazione var userdata = { color: 'figuccio', } var mycolor;//dichiarare la variabile colore //imposta la variabile del colore if(/^#+\w+$/.test(GM_getValue(userdata.color))){ mycolor = GM_getValue(userdata.color); } else {mycolor="#000000"; } ////////////////////////////////////////// // salvare i dati personalizzati function saveSetting() {GM_setValue(userdata.color, mycolor); $('body,#blueBarDOMInspector>div, #blueBarDOMInspector div[role="banner"], #fb2k_pagelet_bluebar>#blueBarDOMInspector>div>div, div[aria-label="Facebook"][role="navigation"]').css("background-color",mycolor); } ///////////////////////////// var hexcolor=document.querySelector('#hexcolor'); var colorinput=document.querySelector('#colorinput'); colorinput.addEventListener('input', function(event){colorChange(event)},false); $('body,#blueBarDOMInspector>div, #blueBarDOMInspector div[role="banner"], #fb2k_pagelet_bluebar>#blueBarDOMInspector>div>div, div[aria-label="Facebook"][role="navigation"]').css("background-color",mycolor ); //evento della tavolozza dei colori function colorChange (e) { mycolor = e.target.value; hexcolor.innerHTML=e.target.value; //colore immediatamente visibile $('body,#blueBarDOMInspector>div, #blueBarDOMInspector div[role="banner"], #fb2k_pagelet_bluebar>#blueBarDOMInspector>div>div, div[aria-label="Facebook"][role="navigation"]').css("background-color",mycolor ); GM_setValue(userdata.color, mycolor); } document.getElementById('hexcolor').value =mycolor;//value hex document.getElementById('colorinput').value =mycolor; saveSetting();//salva window.setTimeout(saveSetting,3000);//attendi 3sec e risalva il colore utile sulla barra facebook giochi facebook })(); ////////////////////// })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址