HuangQS

Change the page title to 'AAA' when the URL contains 'www.mhhf.com'

当前为 2024-03-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         HuangQS
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Change the page title to 'AAA' when the URL contains 'www.mhhf.com'
// @author       You
// @match        *://*/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 获取当前页面的URL
    const currentURL = window.location.href;

    // 亡灵增量
    if (currentURL.includes('www.mhhf.com') || currentURL.includes('www.json1.cn')) {
        document.title = '测试-Canvas绘制展示';
    }

    //json在线解析去广告
    else if (currentURL.includes('www.json.cn')) {
        document.title = 'JSON';

        // 找到对应的按钮元素 触发点击事件
        let clickEvent = new MouseEvent('click', { bubbles: true, cancelable: true, view: window });
        document.getElementById('formatFullScreen').dispatchEvent(clickEvent);
    }

})();