Last active
December 23, 2020 00:58
-
-
Save TheZ3ro/d07ae64bf72cb9ed874722e5e012d994 to your computer and use it in GitHub Desktop.
Greasemonkey (Userscript) Hide the Facebook LoginDialog in the bottom part of the page - Press on Raw to install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FB LoginDialog Hider | |
// @namespace loginhider.thezero.org | |
// @include https://*.facebook.com/* | |
// @include http://*.facebook.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// If you don't have a facebook account or you are not logged in, | |
// when you visit a facebook content page (ex. A Profile or a Post) | |
// a BIG and UGLY LoginDialog will appear on the bottom of the page. | |
// This few lines of code will detect whenever the Dialog appear | |
// and after a blink it will disappear immediately. | |
var logindialog = document.getElementById("pagelet_growth_expanding_cta"); | |
var interval = window.setInterval(detect, 1000); | |
console.log("Facebook LoginDialog Hider"); | |
function detect() { | |
if(logindialog.children[0].style.height != ""){ | |
logindialog.style.display = "none"; | |
console.log("Done!"); | |
clearInterval(interval); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks it works :D