Isekaiscan: Show Only Updated Follows

On the isekaiscan follows page, only show manga that have an update.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Isekaiscan: Show Only Updated Follows
// @version      1.0
// @description  On the isekaiscan follows page, only show manga that have an update.
// @author       tomcatadam
// @grant        None
// @match        https://isekaiscan.com/user-settings/?tab=bookmark
// @match        https://isekaiscan.com/user-settings/
// @icon         https://www.google.com/s2/favicons?domain=isekaiscan.com
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @namespace https://greasyfork.org/users/710133
// ==/UserScript==

/* jshint esversion: 6 */
/* globals $, jQuery */

this.$ = this.jQuery = jQuery.noConflict(true);

const verbose = false;

$(document).ready(function() {
    if ($('div.c-notifications').length === 0) {
        // TODO: Insert some info on the page to make this clear.
        console.log("No new updates found. Showing all manga.");
        return;
    }

    $('tr').each(function() {
        // TODO: This is probably very inefficient and slow.
        if ( $(this).has('td > div.mange-name > div.item-thumb').length > 0) {
            if (verbose) {
                console.log(`Element ${$(this)[0].textContent} has thumbnail.`);
            }

            if ($(this).has('td > div.mange-name > div.item-thumb > div.c-notifications').length > 0) {
                console.log("Element has notification. Not hiding.");
            } else {
                console.log("Element does not have notification. Hiding.");
                $(this).hide();
            }
        }
    });
});