Skip to content

Instantly share code, notes, and snippets.

@TheZ3ro
Last active December 23, 2020 00:58
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheZ3ro/d07ae64bf72cb9ed874722e5e012d994 to your computer and use it in GitHub Desktop.
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
// ==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);
}
}
@TheZ3ro
Copy link
Author

TheZ3ro commented Sep 11, 2016

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.

@pasu11
Copy link

pasu11 commented Mar 22, 2018

thanks it works :D

@roflsunriz
Copy link

no longer work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment