Created
June 21, 2016 22:43
-
-
Save dawsontoth/183a6472d2a4e6312fdf260504c33b3b to your computer and use it in GitHub Desktop.
Hide Facebook Elements I Don't Like
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 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