Last active
November 28, 2019 03:41
-
-
Save happiness801/54ccde98b931f96240eabb878cbfef88 to your computer and use it in GitHub Desktop.
Removes Facebook cruft
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 Remove Ads/Cruft from facebook.com | |
// @namespace http://onai.net/ | |
// @version 0.1 | |
// @description Removes ads, cruft | |
// @author Kevin Gwynn | |
// @match https://www.facebook.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let removeCruft = function() { | |
// Not working as a userScript currently; not sure why | |
let $ = document.querySelector; | |
// Accurate as of 2019-11-27 | |
$('div[role=navigation] UL LI:nth-child(2)').remove(); // Watch | |
$('div[role=navigation] UL LI:nth-child(2)').remove(); // Marketplace | |
$('div[role=navigation] UL LI:nth-child(3)').remove(); // Gaming | |
$('div[role=complementary] div div div div div').remove(); // Ad... | |
$('div[role=banner] div:nth-child(4) div div div').remove(); // Give Feedback | |
}; | |
//setTimeout(removeCruft, 1000); | |
//setTimeout(removeCruft, 3000); | |
//setTimeout(removeCruft, 5000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment