Fanza Filter Util

filtering util on Fanza doujin

Version vom 17.07.2023. Aktuellste Version

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.sleazyfork.org/scripts/471066/1221500/Fanza%20Filter%20Util.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Fanza Filter Util
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  filtering util on Fanza doujin
// @author       RamisAmuki
// @icon         https://www.google.com/s2/favicons?sz=64&domain=dmm.co.jp
// @grant        none
// @license      MIT
// @require      https://greasyfork.org/scripts/469263-ramisamuki-utils/code/RamisAmuki%20Utils.js?version=1209366
// ==/UserScript==

// ignore list
const is_bookmark_page = location.pathname !== "/dc/doujin/-/bookmark/";
const ignore_querys = [
  "span.u-common__ico--basketDone",
  "span.listPurchased__btn",
];
const ignore_genres = ["ボイス"];
const ignore_authors = is_bookmark_page ? ["TGA"] : [];
const ignore_titles = ["体験版", "無料版"];

// query
const querys = is_bookmark_page
  ? {
      lists: "ul.fn-productList > li.productList__item",
      genre: "div.listGenreIco__ico",
      author: "div.tileListTtl__txt--author",
      title: "div.tileListTtl__txt",
      rate: "span.c_icon_priceStatus",
      price: "p.c_txt_price",
      button_parent: "div.pageNation__item",
    }
  : {
      lists: "ul.basket-list-tile > li.basket-listItem-tile",
      genre: "span.c_icon_genre",
      author: "p.basket-circle-tile",
      title: "b.basket-name-tile",
      rate: "span.c_icon_priceStatus",
      price: "p.c_txt_price",
      button_parent: "div.basket-btnAreaCol1",
    };

const checker = (liqs) => {
  const auhtor = liqs(querys.author).innerText.trim();
  const title = liqs(querys.title).innerText;
  if (liqs(querys.rate) === null) return true;
  // checking
  return [
    check_rate_price(liqs, querys),
    ignore_querys.some((query) => liqs(query) != null),
    ignore_genres.includes(liqs(querys.genre).innerText),
    ignore_authors.includes(auhtor),
    ignore_titles.some((ignore) => title.includes(ignore)),
  ].some((b) => b);
};