// ==UserScript==
// @name new Facebook figuccio
// @namespace https://greasyfork.org/users/237458
// @version 8.9
// @author figuccio
// @description new facebook con logo e home facebook recenti
// @include https://*.facebook.com/*
// @include https://*.facebook.com/me/*
// @grant GM_addStyle
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_registerMenuCommand
// @run-at document-end
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @icon https://www.google.com/s2/favicons?domain=facebook.com
// @require https://greasyfork.org/scripts/12228/code/setMutationHandler.js
// @noframes
// @license MIT
// ==/UserScript==
//aggiunto pulsante facebook recent
function home(){
var recent=document.createElement('a');
recent.innerHTML=" Ho<br/> Me ";
recent.href="https://www.facebook.com/?sk=h_chr";
recent.id="recent1";
recent.title = 'recent';
recent.style="text-decoration: none;left:-370px;color:var(--primary-text);position:fixed;border-top-left-radius: 50%;border-bottom-left-radius: 50%;border-top-right-radius: 50%;border-bottom-right-radius: 50%;background-color:var(--secondary-button-background);border:2px solid #c471ed!important;font-weight:700;padding-left: 4px;padding-right: 4px;padding-top: 4px; padding-bottom: 4px; leftmargin:15px;"
document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild.parentNode.insertBefore(recent,document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild);
}
window.setTimeout(home,5000);
//GM_registerMenuCommand("✅riavvia recent",home);
////////////////
//zona cerca su facebook bordi arrotondati
GM_addStyle('div.rq0escxv.byvelhso.q10oee1b.poy2od1o.j9ispegn.kr520xx4.ooia0uwo.kavbgo14.mhnrfdw6{background-color: rgb(43,134,197,.5)!important;border:2px solid #c471ed!important;}');
GM_addStyle('div.rq0escxv.byvelhso.q10oee1b.poy2od1o.j9ispegn.kr520xx4.ooia0uwo.kavbgo14.mhnrfdw6{border-top: unset!important;border-left:unset!important;border-bottom-right-radius:28px!important;');
//////////////////////////////////////////////bordo arrotondato zona messaggi notifiche ecc
GM_addStyle('div.ehxjyohh.kr520xx4.poy2od1o.b3onmgus.hv4rvrfc.n7fi1qx3 {background-color: rgb(43,134,197,.5)!important;backdrop-filter: blur(2px)!important;}');
GM_addStyle('div.ehxjyohh.kr520xx4.poy2od1o.b3onmgus.hv4rvrfc.n7fi1qx3 {border:2px solid #c471ed!important;border-top:unset!important;border-right:unset!important;}');
GM_addStyle('div.ehxjyohh.kr520xx4.poy2od1o.b3onmgus.hv4rvrfc.n7fi1qx3 {border-bottom-left-radius: 28px!important;transition: all .25s .75s ease-in-out!important;}');
//cerchi notifiche messaggi ecc colorati
GM_addStyle('.q676j6op{background-color:unset!important;border-radius:22px!important;border:2px solid #c471ed!important;}');
//////////////////////////////////////
//post e commenti colorati
GM_addStyle(':root,.__fb-dark-mode{--surface-background: blue; important;}');//ok'
GM_addStyle(':root,.__fb-dark-mode{--comment-background: #4B0205; !important;}');//commenti
GM_addStyle(':root,.__fb-dark-mode{--nav-bar-background:red; !important;}');//barra facebook
//home preferiti recenti pagina centrale
GM_addStyle('.qsy8amke {display:none!important;}');
//watch marketplace groups gaming
GM_addStyle('div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(1){display:none!important;}');//home
GM_addStyle('div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(2){display:none!important;}');
GM_addStyle('div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(3){display:none!important;}');
GM_addStyle('div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(4){display:none!important;}');
GM_addStyle('div[role="navigation"][aria-label="Facebook"]>ul>li:nth-child(5){display:none!important;}');
//////////////////////
//tasto menu accanto ha messaggi
GM_addStyle('div.oi9244e8.taijpn5t.datstx6m.j83agx80.bp9cbjyn > .bx45vsiw > .iyyx5f41.dhp61c6y.dp1hu0rb.owwhemhu.qowsmv63.cebpdrjk.bipmatt0.pk4s997a.q3lfd5jv.k5wvi7nf.t1p8iaqh.a8s20v7p.abs2jz4q.a6sixzi8.tojvnm2t{display: none!important}');
//giochi sopra la chat
GM_addStyle('div.dati1w0a.hv4rvrfc.bi6gxh9e.aov4n071.d2edcug0.pfnyh3mw.cbu4d94t.j83agx80.du4w35lb.l9j0dhe7.rq0escxv > .k4urcfbm.l9j0dhe7.j83agx80 > .sbcfpzgs.stjgntxs.ni8dbmo4.k4urcfbm.nwvqtn77.fbipl8qg.m5lcvass.io0zqebd.hybvsw6c.du4w35lb.l9j0dhe7.rq0escxv{display: none!important}');
//elimina piccolo spazio occupato inutilmente sopra contatti dopo la rimozione dei giochi sopra la chat
GM_addStyle('.cxgpxx05 > div > .discj3wi.d2edcug0.pfnyh3mw.cbu4d94t.j83agx80.du4w35lb.l9j0dhe7.rq0escxv{display: none!important}');
//popup accetta cookie nascosto
GM_addStyle('div[data-testid=\"cookie-policy-dialog\"]{display: none!important}');
//memorizza password
GM_addStyle('.sjgh65i0 > .k4urcfbm.l9j0dhe7.j83agx80 > .sbcfpzgs.stjgntxs.ni8dbmo4.k4urcfbm.nwvqtn77.fbipl8qg.m5lcvass.io0zqebd.hybvsw6c.du4w35lb.l9j0dhe7.rq0escxv > .k4urcfbm {display: none!important}');
//crea stanza
GM_addStyle('.ecm0bbzt.e5nlhep0.l9j0dhe7.k4urcfbm.du4w35lb > .du4w35lb.l9j0dhe7.rq0escxv {display: none!important}');
/////////////////////////////////////////////////
//nasconde pop up notifica a sinistra quando si gioca
GM_addStyle('ul[data-gt*=\"\\\"ref\\\":\\\"beeper\\\"\"] {display:none !important;}');
//nascondi blocco publicita app giochi facebook
GM_addStyle('div._1k76,div._pagelet_ego_pane { display:none;}');
// ti piace questo gioco popup
GM_addStyle('._3mqg {display:none!important}');
///////////////////////crea una storia e pass con immagine dalla sez centrale rimosse
GM_addStyle('.sbcfpzgs.k4urcfbm.stjgntxs.ni8dbmo4.l82x9zwi.uo3d90p7.pw54ja7n.ue3kfks5.hybvsw6c.du4w35lb.l9j0dhe7.rq0escxv > .k4urcfbm{display:none!important}');
GM_addStyle('.gs1a9yip.j83agx80.btwxx1t3.owycx6da.jifvfom9.dlv3wnog.rl04r1d5.ni8dbmo4.stjgntxs.jbae33se.cxgpxx05.l9j0dhe7 {display:none!important}');
GM_addStyle('.m9osqain.m7msyxje.tmrshh9y.m7zwrmfr.taijpn5t.sk4xxmp2.agehan2d.n8ej3o3l.rt8b4zig.spb7xbtv.bkmhp75w.emlxlaya.s45kfl79.bp9cbjyn.p8dawk7l.abiwlrkh.l9j0dhe7.lzcic4wl.f1sip0of.esuyzwwr.i1ao9s8h.a8nywdso.qt6c0cv9.rz4wbd8a.jb3vyjys.hcukyx3x.oygrvhab.cxmmr5t8.kvgmc6g5.p7hjln8o.j83agx80.nhd2j8a9.rq0escxv.r7d6kgcz.e9989ue4.esr5mh6w.qu0x051f.hn33210v.oajrlxb2{display:none!important}');
//persone che potresti conoscere
GM_addStyle('.k4urcfbm.l9j0dhe7.jktsbyx5.dy7m38rt.stjgntxs.ni8dbmo4.o7xrwllt.c8r2yrt7{display:none!important}');
GM_addStyle('.bp9cbjyn.j83agx80.jnigpg78.taijpn5t.ecm0bbzt.hv4rvrfc.a5h7je3r.dati1w0a{display:none!important}');
GM_addStyle('.j83agx80.btwxx1t3.i1fnvgqd.pybr56ya.hv4rvrfc.e5nlhep0.dati1w0a{display:none!important}');
//sponsorizzato sopra la chat
GM_addStyle('.cxgpxx05 > div:nth-of-type(1) > div > .l9j0dhe7 > .sj5x9vvc.cxgpxx05{display:none!important}');
GM_addStyle('.hzawbc8m.m9osqain.lrazzd5p.g1cxx5fr.a5q79mjw.ew0dbk1b.s89635nw.c1et5uql.qv66sw1b.hpfvmrgz.d2edcug0.ik7dh3pa.oi732d6d.l9j0dhe7.stjgntxs.ni8dbmo4.a8c37x1j{display:none!important}');
GM_addStyle('.ejjq64ki.v8c10jal.e3xpq0al.d2edcug0{display:none!important}');
//pulsante crea
GM_addStyle('div.oi9244e8.taijpn5t.datstx6m.j83agx80.bp9cbjyn:nth-of-type(3) > .iyyx5f41.dhp61c6y.dp1hu0rb.owwhemhu.qowsmv63.cebpdrjk.bipmatt0.pk4s997a.q3lfd5jv.k5wvi7nf.t1p8iaqh.a8s20v7p.abs2jz4q.a6sixzi8.tojvnm2t > .q676j6op.qypqp5cg.taijpn5t.sk4xxmp2.agehan2d.n8ej3o3l.rt8b4zig.spb7xbtv.bkmhp75w.emlxlaya.s45kfl79.bp9cbjyn.p8dawk7l.abiwlrkh.l9j0dhe7.lzcic4wl.f1sip0of.esuyzwwr.i1ao9s8h.a8nywdso.qt6c0cv9.rz4wbd8a.jb3vyjys.hcukyx3x.oygrvhab.cxmmr5t8.kvgmc6g5.p7hjln8o.j83agx80.nhd2j8a9.rq0escxv.r7d6kgcz.e9989ue4.esr5mh6w.qu0x051f.tdjehn4e.oajrlxb2{display:none!important}');
///////////////////////////////////////////////////barra blu su giochi facebook////////
GM_addStyle('body ._2s1x ._2s1y{background-color:blue!important;}');
//nascondi trova amici guida rapida e crea link vecchia barra facebook giochi facebook
GM_addStyle('#findFriendsNav,div._59fb._tmz,#creation_hub_entrypoint { display:none;}');
//barra ricerca nascosta giochi
GM_addStyle('._4kny ._585- {display: none!important}');
//bordi tratteggiati
GM_addStyle('#facebook ._-kb div.rirtxc74{ border-radius:14px;border-style:dashed;border-color:green;border-spacing:26px;margin:px;}');//margin 14px
//colore spondo nomi arrotondati
GM_addStyle('.nnctdnn4 {min-height: 44px; background-color:#da2456;border-radius:22px;margin:3px!important;}');
//bordi sez centrale
GM_addStyle('.sbcfpzgs {--T68779821: 0 1px 2px var(--shadow-2); border:red; border-style: dashed;border-width: 2px;}');
//icone compresa la home .aaxa7vy3
GM_addStyle('.aaxa7vy3,.em6zcovv{fill: #1ef12e!important;}');
//sidebar sinistra
GM_addStyle('div[data-pagelet="LeftRail"]{background-color:blue!important;}');
//eliminato piccolo spazio sopra sidebar sinistra
GM_addStyle('.tr9rh885{margin-top:0px!important;}');
//sidebar destra chat
GM_addStyle('div[role="complementary"]{background-color:orange!important;}');
////////////////////////////////////////scritta contatti in chat e i tuoi collegamenti//
GM_addStyle('.aodizinl{background-color:red!important;padding:15px!important;border-radius:20px}');
//icone contatti cerchio piu visibile 3puntini ... sui post cerchio piu visibile
GM_addStyle('.pkj7ub1o::after{background-color:#ee82ee63!important}');
///////////////////////sezione notizie larga interferisce con tagga amici
GM_addStyle('.oh7imozk {width:100%!important;}');
//margine superiore sezione notizie rivisto
GM_addStyle('.oh7imozk {margin-top:5px!important;}');
/////////////////////////////////////////////////////////////////
//////////////////////popup notifiche in basso ha sinistra rimozione
(function() {var css = "";
if (false || (document.domain == "facebook.com" || document.domain.substring(document.domain.indexOf(".facebook.com") + 1) == "facebook.com"))
css += [
"",
" /*nasconde pop up notifica a sinistra*/",
"ul[data-gt*=\"\\\"ref\\\":\\\"beeper\\\"\"] { display:none !important; }",
"",
"ul[data-gt*=\"\\\"ref\\\":\\\"beeper\\\"\"], ul.poy2od1o.p7hjln8o > li.pmk7jnqg.pedkr2u6.ilcmz9jb.j9ispegn > :not(.cwj9ozl2), .poy2od1o ul.p7hjln8o > li.pmk7jnqg.pedkr2u6.ilcmz9jb.j9ispegn > :not(.cwj9ozl2), .poy2od1o.kavbgo14[class*='-mode'] li > :not([class*='-mode']) { display:none !important; } ",
].join("\n");
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
})();
//cambio colore barra facebook+pagina centrale random 12 colori rimuovere body per avere solo la barra facebook che cambia colore
$(function() {
var colors = ["#0099cc","#587b2e","#990000","#000000","#1C8200","#987baa","#981890","#AA8971","#1987FC","#99081E","#ff5722","#28768e75"];
setInterval(function() {
var bodybgarrayno = Math.floor(Math.random() * colors.length);
var selectedcolor = colors[bodybgarrayno];
$("body,.thodolrn ").css("background",selectedcolor);
}, 9000);
})
/////////////////////rimuove sponsorizzati zona chat
var xpath = function (xpathToExecute) {
var result = [];
var nodesSnapshot = document.evaluate(xpathToExecute, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < nodesSnapshot.snapshotLength; i++) {
result.push(nodesSnapshot.snapshotItem(i));
}
return result;
};
var thePath = "//div/div[1]/div/div[3]/div/div/div[1]/div[1]/div/div[3]/div/div/div[1]/div/div[1]/span/div";
var runCount;
var intv = 500; // Esegui ogni 0,5 secondi
var intvEnd = 5000 // Cancella dopo 5 secondi
var go = setInterval(pollDOM, intv);
function pollDOM() {
runCount+=intv; // Aggiungi il valore intv a runCount ogni volta per contare la quantità di ms eseguiti
if (runCount >= intvEnd) { // Cancella intervallo dopo intvEnd
clearInterval(go);
}
try {
if (xpath(thePath)[0].children[0].children.length) {
xpath(thePath)[0].children[0].remove();
}
} catch {}
}
////////////////////////////////////////
function NEWaddtopnavbarlogout(){
var logout=document.createElement('a');
logout.innerHTML=" Log<br/> Out ";
logout.href="";
logout.id="Logout";
logout.title = 'esci';
logout.style="text-decoration: none;left:7px;color:var(--primary-text);position:relative;background-color:var(--secondary-button-background);border:2px solid #c471ed!important;font-weight:700;padding-left: 4px;padding-right: 4px;padding-top: 4px; padding-bottom: 4px; leftmargin:15px;border-top-left-radius: 50%;border-bottom-left-radius: 50%;border-top-right-radius: 50%;border-bottom-right-radius: 50%;"
document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild.parentNode.insertBefore(logout,document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild);
logout.addEventListener("click", function(e) {e.preventDefault(); document.querySelector('div[aria-label="Account"]').click(); window.setTimeout(function(){document.querySelector('div[data-nocookies="true"]').querySelector('span').click();e.target.innerHTML='<img src="//www.facebook.com/images/loaders/indicator_blue_small.gif"/>'},100)},false);
}
window.setTimeout(NEWaddtopnavbarlogout,5000);
GM_registerMenuCommand("✅riavvia logout",NEWaddtopnavbarlogout);
////////////////
$(document).ready(function() {
function updateClock() {
let time = new Date().toLocaleTimeString();
let d = new Date();
let ms = d.getMilliseconds()
node.innerHTML = time+ ":" +ms;
}
let node = document.createElement('a');
node.style="text-decoration: none;margin-left:800px;position:fixed;line-height:12px;width:auto;padding:3px 6px;color:var(--primary-text);border:2px solid #c471ed!important;background-color:var(--secondary-button-background);font-family:sans-serif;top:6px;text-align:center;border-radius:10px;"
document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild.parentNode.insertBefore(node,document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild);
node.addEventListener('click',function(e) {e.preventDefault();document.querySelector('div[aria-label="Account"]').click();window.setTimeout(function() {document.querySelector('div[data-nocookies="true"]').querySelector('span').click();}, 100)}, false);
document.body.appendChild(node);
setInterval(() => updateClock(), 70);
node.id="clock";
node.title = 'logout';
//mostra nascondi orologio
function myFunctionclock() {
node.style.display = ((node.style.display!='none') ? 'none' : 'block');}
//GM_registerMenuCommand("nascondi-clock/mostra-clock",myFunctionclock);
function dateClock() {
let date = new Date();
let datario = date.toLocaleString('it',{
day:'2-digit',year:'numeric',month:'long',weekday:'long',
});
node1.innerHTML = datario;
}
let node1 = document.createElement('a');
node1.style="text-decoration:none;margin-left:800px;position:fixed;line-height:12px;width:auto;padding:3px 6px;color:var(--primary-text);border:2px solid #c471ed!important;background-color:var(--secondary-button-background);font-family:sans-serif;top:6px;text-align:center;border-radius:10px;"
document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild.parentNode.insertBefore(node1,document.querySelectorAll('div[role="banner"] div[role="navigation"]')[1].firstChild);
node1.addEventListener('click',function(e) {e.preventDefault();document.querySelector('div[aria-label="Account"]').click();window.setTimeout(function() {document.querySelector('div[data-nocookies="true"]').querySelector('span').click();}, 100)}, false);
document.body.appendChild(node1);
setInterval(() => dateClock(), 1000);
node1.id="clock1";
node1.title = 'logout';
function myFunctiondata() {
node1.style.display = ((node1.style.display!='none') ? 'none' : 'block');}
//GM_registerMenuCommand("nascondi-data/mostra-data",myFunctiondata);
function Functionok() {
if (node.style.display === 'none') {
node.style.display = 'block';
node1.style.display = 'none';
} else {
node.style.display = 'none';
node1.style.display = 'block';
}
}
//data e ora alternata ogni 5 secondi
setInterval(() => Functionok(), 5000);
//GM_registerMenuCommand("mostra data /time",Functionok);
//al passaggio mouse
node.addEventListener('mouseover', Functionok);//passaggio del mouse
node1.addEventListener('mouseout',Functionok);//toglie il mouse
node1.style.display = 'none';
});
//accetta tutti cookie facebook
document.cookie = "datr=7JceYLHE4muIe3TIZpm1aiuj; domain=.facebook.com;max-age=315360000";
if(!localStorage.reload) {
setTimeout("document.location.reload()",2000);
localStorage.reload = 1;
}
////////////////////////////////////////////////////////////////////////
// Verifica che l'URL principale sia il più recente
if (document.URL == "https://www.facebook.com/") window.location.href = "https://www.facebook.com/?sk=h_chr";
if (document.URL == "https://www.facebook.com/?ref=tn_tnmn") window.location.href = "https://www.facebook.com/?sk=h_chr";//home giochi facebook
if (document.URL == "https://www.facebook.com/?ref=logo") window.location.href = "https://www.facebook.com/?sk=h_chr"; //logo facebook giochi facebook
if (document.URL == "https://www.facebook.com/?sk=h_nor") window.location.href = "https://www.facebook.com/?sk=h_chr";
if (document.URL == "https://www.facebook.com/#_=_") window.location.href = "https://www.facebook.com/?sk=h_chr"; //quando si accede ha facebook da google
//////////no login recent
$(document).ready(function() {
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();
})();