Greasy Fork

来自缓存

添加DOTA2版块到S1快速访问

将DOTA2版块添加到saraba1st论坛的导航栏中

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

// ==UserScript==
// @name         添加DOTA2版块到S1快速访问
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  将DOTA2版块添加到saraba1st论坛的导航栏中
// @author       S1傻狗
// @match        https://*.saraba1st.com/*
// @grant        none
// @run-at       document-end
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // 确保"nv"元素存在
    var nvElement = document.getElementById('nv');
    if (nvElement) {
        // 在"nv"元素加载完毕后执行
        var liElement = document.getElementById('mn_Nf1e8');
        if (liElement) {
            var aElement = liElement.querySelector('a');
            if (aElement) {
                aElement.href = 'forum-138-1.html'; // 修改链接地址
                aElement.textContent = 'DOTA2'; // 修改链接文本
            }
        }
    }
})();