JM Shelf - Config

配置常量、TAG_NORMALIZE 简繁映射表 — JM Shelf 推荐脚本的模块库,通过 @require 被主脚本引用。

สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.sleazyfork.org/scripts/581094/1842581/JM%20Shelf%20-%20Config.js

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

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

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

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         JM Shelf - Config
// @namespace    jmshelf-lib
// @version      1.0.0
// @author       Kesdi
// @description  配置常量、TAG_NORMALIZE 简繁映射表 — JM Shelf 推荐脚本的模块库,通过 @require 被主脚本引用。
// @license      MIT
// ==/UserScript==
// 
// 此文件是 GreasyFork 库(library),不直接安装。
// 请安装主脚本: JM Shelf 给杂鱼的个性化推荐
//

// ═══ [1] CONFIG ═══
  const CONFIG = { VERSION: 4, DATA_VERSION: 1, FAVORITE_WEIGHT: 15.0, LIKE_WEIGHT: 8.0, HISTORY_WEIGHT: 1.0, LIVE_DECAY_PER_HOUR: 0.9959, LIVE_NOVELTY_BOOST: 2.5, LIVE_EXISTING_BOOST: 0.15, LIVE_MAX_RATIO: 1.0, LIVE_CONVERGE_LIKE: 40, LIVE_CONVERGE_READ: 15, LIVE_NOVELTY_BOOST: 1.0, W_TAG_BASE: 0.40, W_AUTHOR_BASE: 0.30, W_POP_BASE: 0.05, W_QUALITY: 0.15, W_FRESH: 0.10, TAG_HARD_BLACKLIST: ['ai絵圖'], TAG_SOFT_BLACKLIST: ['巨乳','禁漫書庫','中文'], TYPE_HARD_BLACKLIST: ['長篇','連載中','連載'], ENABLE_IDF_BOOST: true, TEMPERATURE: 0.2, DISPLAY_COUNT: 100, CANDIDATE_POOL_MAX: 8000, TOP_TAGS_COUNT: 50, TAG_COMBO_TOP: 8, SEARCH_PAGES: 2, ALBUMS_PAGES: 10, EXPLORE_PAGES: 5, PER_TAG_LIMIT: 15, PER_AUTHOR_LIMIT: 5, BATTLE_POWER_WEIGHT: 5.0, RANKING_CHANNELS: [] };
  let _jmsSeed = 1;
  const _jmsPRNG = () => { _jmsSeed = (_jmsSeed * 16807) % 2147483647; return (_jmsSeed - 1) / 2147483646; };
  const _random = () => CONFIG.TEMPERATURE < 0.01 ? _jmsPRNG() : Math.random();
  function resetJmsSeed() { _jmsSeed = (Date.now() / 86400000 | 0) + 1; }
  function getAllBlacklistedTags() { return [...new Set([...CONFIG.TAG_HARD_BLACKLIST, ...CONFIG.TAG_SOFT_BLACKLIST])]; }
  const TAG_NORMALIZE = {};
  let _occ = null, _ocCache = {};