IsoHunt - Remove Sponsored Torrents

Removes Sponsored Torrents from the search page

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name          IsoHunt - Remove Sponsored Torrents
// @namespace     https://greasyfork.org/en/users/321-joesimmons
// @description   Removes Sponsored Torrents from the search page
// @include       https://isohunt.to/torrents/?ihq=*
// @copyright     JoeSimmons
// @version       1.0.0
// @license       GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @grant         GM_addStyle
// ==/UserScript==

/* CHANGELOG

    1.0.0 (2/8/2015)
        - created

*/

+function () {
    'use strict';

    var tr = document.evaluate('//div[@id="serps"]/table/tbody/tr/td[ contains(., "Sponsored") ]/ancestor::tr', document, null, 6, null),
        i;

    // make sure the page is not in a frame
    if (window.frameElement || window !== window.top) { return; }

    for (i = 0; i < tr.snapshotLength; i += 1) {
        tr.snapshotItem(i).style.display = 'none';
    }
}();