Remove Facebook Login Nag

Removes the login nag screen on Facebook that shows up when you're not logged in.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Remove Facebook Login Nag
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Removes the login nag screen on Facebook that shows up when you're not logged in.
// @author       Porama Ruengrairatanaroj
// @match        *://*.facebook.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function hideElementsByClassName(className) {
        let elems = document.getElementsByClassName(className);

        for(let i = 0; i < elems.length; ++i) {
            elems[i].style.visibility = 'hidden';
            elems[i].style.display = 'none';
            //let comment = document.createComment(elems[i].outerHTML);
            //elems[i].replaceWith(comment);
        }
    }

    hideElementsByClassName("_3ob9");
    hideElementsByClassName("_62uh");
    hideElementsByClassName("_5hn6");
})();