Skip to content

Instantly share code, notes, and snippets.

@TheZ3ro
Last active December 23, 2020 00:58
Show Gist options
  • 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);
}
}
@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