Novel Updates Filter

Filters table rows based on origin

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Novel Updates Filter
// @namespace    https://www.zerpr.net/
// @version      3
// @description  Filters table rows based on origin
// @author       Zerpr
// @match        *://*.novelupdates.com/*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require     https://greatest.deepsurf.us/scripts/31940-waitforkeyelements/code/waitForKeyElements.js?version=209282
// @grant       GM_addStyle
// ==/UserScript==
//referenced https://stackoverflow.com/questions/31758115/how-to-hide-table-rows-containing-certain-keywords
//Usage: Must be logged into Novel Updates and "Enable Origin Tagging" option (either one) selected in your profile settings


//Add keywords to filter out in novel titles, such as the origin tag
//escape brackets using double backward-slash: \\
var keywords = [
    "\\[KR\\]",
    "\\[CN\\]",
    "\\[FIL\\]",
    "\\[MY\\]"
];

//table class used for novels table
var tableClass = ".tablesorter";

//Allows for use of multiple keywords
var keyW_Regex = new RegExp (keywords.join('|'));


waitForKeyElements (
    tableClass+" td:nth-of-type(1)", hideTargetedRowAsNeeded
);

function hideTargetedRowAsNeeded (jNode) {
    if (keyW_Regex.test (jNode.text () ) ) {
        jNode.parent ().hide ();
    }
}