Skip to content

Instantly share code, notes, and snippets.

@dawsontoth
Created June 21, 2016 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dawsontoth/183a6472d2a4e6312fdf260504c33b3b to your computer and use it in GitHub Desktop.
Save dawsontoth/183a6472d2a4e6312fdf260504c33b3b to your computer and use it in GitHub Desktop.
Hide Facebook Elements I Don't Like
// ==UserScript==
// @name Hide Facebook Elements I Don't Like
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Hides various Facebook elements such as the app nav, advertisting, and suggested pages.
// @author Dawson Toth
// @match https://www.facebook.com/
// @grant none
// ==/UserScript==
(function() {
'use strict';
disableElements();
setTimeout(disableElements, 100);
setInterval(disableElements, 1000);
function disableElements() {
var toDisable = ['pagelet_ego_pane', 'appsNav', 'pinnedNav', 'pagesNav', 'developerNav', 'interestsNav', 'listsNav', 'pagelet_advertiser_panel'];
toDisable.forEach(function(f) {
var item = document.getElementById(f);
if (item) {
item.style.display = 'none';
}
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment