Change Logo Link

Change the logo link from "/" to "/home"

目前為 2024-10-13 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Change Logo Link
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Change the logo link from "/" to "/home"
// @match        *://*/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to change the href attribute
    function changeLogoLink() {
        const logoAnchor = document.getElementById('logo');
        if (logoAnchor && logoAnchor.getAttribute('href') === '/') {
            logoAnchor.setAttribute('href', '/home');
            console.log('Logo link changed to /home');
        }
    }

    // Run the function after the page has loaded
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', changeLogoLink);
    } else {
        changeLogoLink();
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址