萌娘百科黑幕转粉幕,删除线变下划线(改)

萌娘百科黑幕转粉幕,删除线变下划线

目前為 2021-04-06 提交的版本,檢視 最新版本

// ==UserScript==
// @name         萌娘百科黑幕转粉幕,删除线变下划线(改)
// @namespace    https://huangcy.top
// @author       qrqhuang
// @version      0.3
// @description  萌娘百科黑幕转粉幕,删除线变下划线
// @match        http*://zh.moegirl.org/*
// @match        http*://mzh.moegirl.org/*
// @match        http*://zh.moegirl.org.cn/*
// @match        http*://mzh.moegirl.org.cn/*
// @note         2021-04-07 0.3 追加彩色幕及文字模糊检测
// @note         2020-10-02 0.2 移除jquery依赖 + 适配'.org.cn' 国内站点
// @grant        GM_addStyle
// ==/UserScript==

(function () {
    const pinkColor = '#ff99ff';
  
    //替换<s>标签效果为下划线
    GM_addStyle('s {text-decoration: underline}');

    document.querySelectorAll('.heimu').forEach(e => e.style.backgroundColor = pinkColor);
    document.querySelectorAll('.heimu a').forEach(e => e.style.backgroundColor = pinkColor);
    document.querySelectorAll('a .heimu').forEach(e => e.style.backgroundColor = pinkColor);
    document.querySelectorAll('del').forEach(e => e.style.textDecoration = 'underline');
    //彩色幕
    document.querySelectorAll(".colormu").forEach(e => {
        e.style.color = ''; 
        e.style.backgroundColor = pinkColor; 
    });
    //文字模糊
    document.querySelectorAll("[style*='text-shadow:grey']").forEach(e => {
        e.style.color = ''; 
        e.style.textShadow = ''; 
        e.style.backgroundColor = pinkColor; 
    });
})();