取消超链接的下划线

手机端使用X浏览器取消超链接的下划线

As of 26.08.2024. See ბოლო ვერსია.

// ==UserScript==
// @name         取消超链接的下划线
// @namespace    http://tampermonkey.net/
// @version      0.1.7
// @description  手机端使用X浏览器取消超链接的下划线
// @author       zhn
// @match        *://dszh.xyz/list.php?*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=dszh.org
// @grant        GM_addStyle
// @grant        GM_addElement
// ==/UserScript==

(function() {
    'use strict';

    // 添加自定义CSS
    GM_addStyle(`
         a.custom-link {
            text-decoration: none !important; /* 去除下划线 */
        }
    `);
    
    

    window.onload=function(){//do something

        var lists = document.getElementsByTagName("a");
        for(var i = 0;i < lists.length;i++)
        {
            //lists[i].classList.add('custom-link'); 
            lists[i].style.textdecoration = 'none !important';
        }
    }
})();