Skip to content

Instantly share code, notes, and snippets.

@RichardVasquez
Created July 31, 2019 21:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardVasquez/5d46ffe01053162562a7951a6a3f3c02 to your computer and use it in GitHub Desktop.
Save RichardVasquez/5d46ffe01053162562a7951a6a3f3c02 to your computer and use it in GitHub Desktop.
// ==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