Greasy Fork

Greasy Fork is available in English.

Chiphell论坛入口

添加Chiphell论坛入口

目前为 2022-03-12 提交的版本,查看 最新版本

// ==UserScript==
// @name         Chiphell论坛入口
// @description  添加Chiphell论坛入口
// @namespace    http://greasyfork.icu/zh-CN/scripts/441396
// @version      0.3
// @author       lqzh
// @copyright    lqzh
// @include      http*://www.chiphell.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
     var hasBBS = Array.from(document.querySelectorAll("#nv > ul > li")).slice(-1)[0].textContent.includes('论坛');
     if (hasBBS) return ;
     var bbsLi = document.createElement('li');
     bbsLi.innerHTML='<a href="https://www.chiphell.com/forum.php">论坛</a>';
    document.querySelector("#nv > ul").appendChild(bbsLi);
})();