Last active
August 7, 2018 04:08
-
-
Save abcdabcd987/9839987cf0b7cc13e2d9e4b030a188b5 to your computer and use it in GitHub Desktop.
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 PuTao without 4K | |
// @version 1.0.1 | |
// @namespace https://abcdabcd987.com | |
// @homepageURL https://gist.github.com/abcdabcd987/9839987cf0b7cc13e2d9e4b030a188b5 | |
// @author Lequn Chen | |
// @description Remove links to 4K videos in the torrent list. | |
// @run-at document-idle | |
// @match *://pt.sjtu.edu.cn/torrents.php* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
jQuery(".torrentname b").each(function() { | |
if (this.innerText.indexOf("4K") !== -1) { | |
var row = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; | |
row.style.opacity = 0.2; | |
jQuery(row).find("a").removeAttr("href"); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment