Created
July 31, 2019 21:44
-
-
Save RichardVasquez/5d46ffe01053162562a7951a6a3f3c02 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Nuke medium everywhere! | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Yes, for the love of God! | |
// @author Richard Vasquez | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var links = document.links; | |
for(var i = 0; i < links.length; i++){ | |
if( | |
(!links[i].href.toLowerCase().startsWith("https://medium.com/") && | |
!links[i].href.toLowerCase().startsWith("https://www.medium.com/") && | |
!links[i].href.toLowerCase().startsWith("http://medium.com/") && | |
!links[i].href.toLowerCase().startsWith("http://www.medium.com/")) | |
){ | |
continue; | |
} | |
links[i].innerHTML = "[redacted medium link]"; | |
links[i].href = ""; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment