您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
从疑似影视网页的标题中提取片名与集数重新显示
当前为
// ==UserScript== // @name 影视网页标题清理 // @version 8 // @description 从疑似影视网页的标题中提取片名与集数重新显示 // @author Lemon399 // @match *://*/* // @grant none // @namespace https://greasyfork.org/users/452911 // ==/UserScript== function matcher(title) { let result = ""; const regex = /^(?:.*《)?([^》]+?)(?=(?:(?:(?:》(?:[^》第\d]+)*)?(?:_|-)?第|\s)?(\d+)集)|》(\d+)?).*$/; const regrst = title.match(regex); if (regrst) { const [_full, vname, num, njnum] = regrst; const ji = num ? num : njnum; const numtxt = ji ? " " + ji.padStart(2, "0") : ""; if (vname) result = `${vname.trim()}${numtxt}`; } return result; } const parsed = matcher(document.title); if (parsed) document.title = parsed;