Skip to content

Instantly share code, notes, and snippets.

@abcdabcd987
Last active August 7, 2018 04:08
Show Gist options
  • Save abcdabcd987/9839987cf0b7cc13e2d9e4b030a188b5 to your computer and use it in GitHub Desktop.
Save abcdabcd987/9839987cf0b7cc13e2d9e4b030a188b5 to your computer and use it in GitHub Desktop.
// ==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