番组计划主页观看进度中文标题

Bangumi番组计划 主页观看进度 中文标题

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         番组计划主页观看进度中文标题
// @namespace    https://github.com/machsix
// @version      1.1
// @description  Bangumi番组计划 主页观看进度 中文标题
// @author       machsix
// @icon         http://bgm.tv/img/favicon.ico
// @include      *://bgm.tv/
// @include      *://bangumi.tv/
// @grant        none
// @run-at       document-end
// ==/UserScript==

const epGrids = document.querySelectorAll('.infoWrapper_tv .epGird');
epGrids.forEach((item) => {
    const node = item.children[0].children[1];
    const a = node.getAttribute('data-subject-name-cn');
    if (a) node.innerText = a;
});

const grid2 = document.querySelectorAll('#prgSubjectList .clearit');
grid2.forEach((item) => {
    const rootNode = item.getElementsByClassName('title')[0];
    const titleNode = rootNode.getElementsByTagName('span')[0];
    const cnTitle = rootNode.getAttribute('data-subject-name-cn');
    if (cnTitle) titleNode.innerText = cnTitle;
});