Last active
April 16, 2016 16:27
-
-
Save kalmanolah/5067676 to your computer and use it in GitHub Desktop.
This userscript for Greasemonkey disables those pesky confirmation dialogs/pages that links in KAT torrent description blocks show when clicked. It should help reduce my stress levels quite a bit.
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 KickAssTorrents LinkFixer | |
// @namespace KATLinkFixer | |
// @description Disables the confirmation dialogs/pages that links in the description block of KAT torrents show when clicked. | |
// @include /^(http|https)://kat\.ph/[a-zA-Z0-9-]+\.html$/ | |
// @version 1.0.3 | |
// @grant none | |
// @updateURL https://gist.github.com/kalmanolah/5067676/raw/KickAssTorrents_LinkFixer.user.js | |
// ==/UserScript== | |
(function(){ | |
var d = document.getElementById('desc'); | |
var l = d.getElementsByTagName('a'); | |
var c = null; | |
for(var i=0;i<l.length;i++){ | |
c = l[i]; | |
if(/^(http||https):\/\/kat\.ph\/confirm\/.*/i.test(c.href) && /^(http||https):\/\/.*/i.test(c.text)) { | |
c.href = c.text; | |
c.className = ''; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment