// ==UserScript==
// @name new Facebook figuccio
// @namespace https://greasyfork.org/users/237458
// @version 36.6
// @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.6.0/jquery.min.js
// @run-at document-start
// @require https://code.jquery.com/jquery-latest.js
// @require https://code.jquery.com/ui/1.13.2/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';
//Aggiunge una barra percentuale di scorrimento e del testo nella parte superiore della pagina con %
var progressBar = document.createElement('div');
progressBar.style.position = 'fixed';
progressBar.style.top = '0';
progressBar.style.left = '0';
progressBar.style.width = '0%';
progressBar.style.height = '5px';
progressBar.style.backgroundColor = 'gold';
progressBar.style.zIndex = '10000';
progressBar.style.transition = 'width 0.25s ease-out';
document.body.appendChild(progressBar);
// Crea l'elemento di testo percentuale
var progressText = document.createElement('div');
progressText.style.position = 'fixed';
progressText.style.top = '50px';
progressText.style.right = '0';
progressText.style.padding = '5px';
progressText.style.backgroundColor = 'gold';
progressText.style.color = 'red';
progressText.style.zIndex = '10000';
progressText.style.fontFamily = 'Arial, sans-serif';
progressText.style.fontSize = '17px';
document.body.appendChild(progressText);
// Aggiorna la larghezza della barra e del testo durante lo scorrimento
window.addEventListener('scroll', function() {
var scrollTop = window.scrollY || document.documentElement.scrollTop;
var scrollHeight = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrollPercent = (scrollTop / scrollHeight) * 100;
progressBar.style.width = scrollPercent + '%';
progressText.textContent = Math.round(scrollPercent) + '%';
});
///////////////////
// Interrompe la riproduzione degli annunci pubblicitari durante un video.
// Nasconde la sovrapposizione del video, questo viene fatto perché poiché l'evento non si verifica correttamente, Facebook non sa che il video ha interrotto il buffering e mostrerà un'icona di buffering sopra lo schermovideo.
window.addEventListener('playing', function(event) {
event.stopImmediatePropagation();
event.target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.childNodes[1].childNodes[0].childNodes[0].setAttribute('hidden', 'hidden');
}, true);
//Interrompe la riproduzione degli annunci pubblicitari alla fine di un video.
// Rende nuovamente visibile la sovrapposizione video.
window.addEventListener('ended', function(event) {
event.stopImmediatePropagation();
event.target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.childNodes[1].childNodes[0].childNodes[0].removeAttribute('hidden');
}, true);
/////////////////////////////
//Facebook Reel: Video Controls
document.addEventListener('play', (evt) => {
const target = (evt || 0).target;
if (target instanceof HTMLVideoElement && !target.hasAttribute('controls') && location.href.includes('reel')) {
let buttonLayer = target.closest('div[class][role="button"][tabindex]');
if (buttonLayer) {
target.setAttribute('controls', '');
setTimeout(() => {
Object.assign(target.style, {
'position': 'relative',
'zIndex': 999,
'pointerEvents': 'all'
});
[...buttonLayer.querySelectorAll('.x10l6tqk.x13vifvy:not(.x1m3v4wt)')].forEach(s => {
Object.assign(s.style, {
'pointerEvents': 'none',
'position': 'relative',
'zIndex': 1000
});
});
}, 1);
}
}
}, true);
//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}');
//nasconde pop up notifica a sinistra quando si gioca
GM_addStyle('ul[data-gt*=\"\\\"ref\\\":\\\"beeper\\\"\"] {display:none!important;}');
//nasconde pop up notifica a sinistra sulla home
GM_addStyle('div[role="complementary"][aria-labelledby] {display:none!important;}');
// ti piace questo gioco popup
GM_addStyle('._3mqg {display:none!important}');
///////////////////////crea una storia dalla sez centrale rimosse (necessario Condividi una ho scrivi qualcosa)
GM_addStyle('.xquyuld.x10wlt62.x6ikm8r.xh8yej3.xt3gfkd.xu5ydu1.xdney7k.x1qpq9i9.x1jx94hy.x1ja2u2z.x1n2onr6.x9f619 > .xwib8y2.x1y1aw1k {display:none!important}');//marzo 2024
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
GM_addStyle(`
/* sidebar sinistra visibile su tutti gli altri account luglio 2023 */
div[role="banner"]+div div[role="navigation"] {
border-radius: 14px;
border: 2px solid lime !important;
margin-top: 0px !important;
font-family: monospace !important;
}
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 */
div[role="complementary"] {
border-radius: 14px;
border: 2px solid red !important;
margin-top: 4px !important;
font-family: Raleway !important;
}
div[role="complementary"]:hover {
background-image: url(https://media2.giphy.com/media/asG02gUfDyIxdODF76/giphy.gif);
background-blend-mode: overlay;
}
/* Stile comune per gli elementi con bordo rosso ha cosa stai pensando bordo*/
.xz9dl7a.x1swvt13.x1pi30zi.x1a8lsjc.x1a02dak.x78zum5.x6s0dn4,
.x6o7n8i.x1unhpq9.x1hc1fzr > div {
border-radius: 14px;
border: 2px solid red!important;
}
/* Stile specifico per il bordo verde sui feed */
.x6o7n8i.x1unhpq9.x1hc1fzr > div {
border: 2px solid lime!important;
}
/*watch marketplace groups gaming*/
div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(n+2):nth-child(-n+5) {
display: none !important;
}
/* cerchi notifiche messaggi ecc */
.x1qhmfi1 {
border-radius: 22px!important;
border: 2px solid #c471ed!important;
}
`);
//feed piu grandi compreso ha cosa stai pensando avviare dopo che la pagina e stata caricata
var $ = window.jQuery;//$ evita triangolo giallo
$(document).ready(function() {
//remove sponsorizzati marketplace
const MARKET_PLACE_REGEX = /(?:https?:\/\/)?(?:www\.)?(mbasic.facebook|m\.facebook|facebook|fb)\.(com|me)\/marketplace/ig
new MutationObserver(function(mutationList, observer) {
// Assicurati di essere sul lato marketplace di Facebook
if (!window.location.href.match(MARKET_PLACE_REGEX)) {
return;
}
// Nascondi i risultati "sponsorizzati".
document.querySelectorAll('div.xjkvuk6.x1iorvi4.x1uepa24.x291uyu.xnpuxes.x150jy0e.x1e558r4.xs83m0k.x1iyjqo2.xdt5ytf.x1r8uery.x78zum5.x9f619 > span').forEach(function(element) {
const parent = element.parentElement;
if(!parent) {
return;
}
parent.style.display = 'none';
console.log("Hidden sponsored item", parent);
// Prendi la riga che contiene "Sponsorizzato" + nome della categoria
const parentBar = element.closest('.xkrivgy.x1gryazu.x1n2onr6')
if(!parentBar) {
return;
}
// Rimuovi la parte effettiva "Sponsorizzata".
const sponsoredBarItem = parentBar.querySelector('.x1pha0wt.x78zum5.x1r8uery.xdt5ytf.x1iyjqo2.x1qughib')
if(!sponsoredBarItem) {
return;
}
sponsoredBarItem.style.display = 'none';
console.log("Hidden sponsored bar", sponsoredBarItem);
});
}).observe(document.body, {childList:true, subtree:true});
////////////////////////////////////////////////////////////
//feed piu grandi compreso ha cosa stai pensando
function adjustWidths() {
const feedElements = document.querySelectorAll('.x193iq5w.xvue9z.xq1tmr.x1ceravr');
feedElements.forEach(element => {
if (element.style.width !== '1000px') {
element.style.width = '1000px';
}
});
}
// Osserva le modifiche nel documento e aggiusta le larghezze dei feed
const observer = new MutationObserver(adjustWidths);
observer.observe(document.body, {childList:true, subtree:true});
// Aggiusta le larghezze quando la pagina è completamente caricata
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 });
}
// Rendi l'elemento trascinabile con limitazioni di schermo
makeDraggableLimited($(box));
////////////////////////////audio effetto sonoro quando si clicca sulla x rossa
var Sound = new Audio("data:audio/mp3;base64,SUQzAwAAAAABTVRYWFgAAAARAAAAbWFqb3JfYnJhbmQAZGFzaFRYWFgAAAAXAAAAU29mdHdhcmUATGF2ZjU1LjMzLjEwMFRYWFgAAAAbAAAAY29tcGF0aWJsZV9icmFuZHMAaXNvNm1wNDFUWFhYAAAAEAAAAG1pbm9yX3ZlcnNpb24AMFRJVDIAAAAOAAAAU0tVTEwgVFJVTVBFVENPTU0AAAAwAAAAAAAAAGh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZVZyWWJLQnJJN2//+5AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAAAwAABU4ABUVFRUVFRUVKioqKioqKipAQEBAQEBAQFVVVVVVVVVVVWpqampqampqgICAgICAgICVlZWVlZWVlZWqqqqqqqqqqsDAwMDAwMDA1dXV1dXV1dXV6urq6urq6ur//////////wAAADlMQU1FMy45OXIBqgAAAAAAAAAAFIAkBnhGAACAAAAVOJoFAPEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==");
/////////////////////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= "#980000";//Inizializza con il valore di default
//imposta la variabile colore
if (/^#+\w+$/.test(GM_getValue(userdata.color))) {mycolor=GM_getValue(userdata.color);}//maggio 2024
// salvare i dati personalizzati
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);
}
// Funzione per osservare i cambiamenti nel DOM
function observeDOMChanges() {
// Creazione di un observer con una funzione di callback
var observer = new MutationObserver(function(mutationsList, observer) {
// Per ogni mutazione rilevata, esegui la funzione saveSetting
for(var mutation of mutationsList) {
saveSetting();
}
});
// Configurazione dell'observer per osservare cambiamenti nei nodi figlio e nei nodi attributo
var config = {childList:true, attributes:true, subtree:true};
// Inizia ad osservare il DOM target
observer.observe(document.body, config);
}
// Avvia l'osservazione dei cambiamenti nel DOM
observeDOMChanges();
// Funzione per nascondere la sezione di creazione della storia
function hideStoryCreation() {
var storyComposer = document.querySelector('[aria-label="Storie"]');
if (storyComposer) {
storyComposer.style.display = 'none';
}
}
// Funzione per gestire lo stato della checkbox e la sfocatura della chat
function saveCheckbox() {
GM_setValue("checkboxState", document.getElementById("checkbox1").checked.toString());
var chat = document.querySelector(".xwib8y2 ul");//.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😩";
}
}
// 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});
$f(document).ready(function() {
// Gestisci il cambio di stato della checkbox
$f("#checkbox1").change(function(){
GM_setValue("checkboxState", document.getElementById("checkbox1").checked.toString());
saveCheckbox();
});
// Carica lo stato della checkbox al caricamento della pagina
if (GM_getValue("checkboxState") === "true") {
$f("#checkbox1").prop("checked", true);
saveCheckbox();
}
});
// Sfoca la chat al caricamento della pagina
document.onreadystatechange = function() {
if (document.readyState == "complete" && GM_getValue("checkboxState") === "true") {
saveCheckbox();
}
};
// Monitora le modifiche nel DOM per applicare la sfocatura della chat
var chatObserver = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.type === 'childList' && GM_getValue("checkboxState") === "true") {
saveCheckbox();
}
});
});
chatObserver.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;
white-space:nowrap;
color:red;
background:aquamarine;
cursor:pointer; /*sulla scritta*/
}
`);
///////////////////////clock
setInterval(myTimer,90);
function myTimer() {
var d = new Date();
var t = d.toLocaleTimeString();
var mm = d.getMilliseconds();
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:380px 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:380px;">
<div id="demo" title="Data-ora" ></div>
<legend>Time</legend>
<div id=setuiface>
<button id="colorspan"title="Hex value">${mycolor}</button><input type="color" list="colors" id="colorinput" value="${mycolor}" title="Color picker">
<span class="button" title="Esci" id='logout' style="background-color:red;border:1px solid yellow;border-radius:3px;cursor:pointer;">Logout</span>
<span class="button" title="Chiudi" id='close' style="background-color:red; color:lime;border:1px solid yellow;border-radius:50%;cursor:pointer;">X</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
//})();
//////////////////no login recent (aprile 2024 i.a)
window.setTimeout(clearRecentLogins, 100);
function clearRecentLogins() {
var recentLogins = document.querySelectorAll('.removableItem a[role="button"][ajaxify^="/login/device-based"]');
if (recentLogins.length === 0) {
return;
}
recentLogins.forEach(function(login) {
login.click();
});
}
})();
//////////
})();