Greasy Fork

Change Logo Link of hianime.to

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

目前为 2024-10-13 提交的版本。查看 最新版本

// ==UserScript==
// @name        Change Logo Link of hianime.to
// @namespace   roxyscripts
// @match       https://hianime.to/*
// @grant       none
// @version     1.1
// @description  Change the logo link from "/" to "/home"
// @author      roxy
// @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();
    }
})();