Change Logo Link of hianime.to

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

  1. // ==UserScript==
  2. // @name Change Logo Link of hianime.to
  3. // @namespace roxyscripts
  4. // @match https://hianime.to/*
  5. // @grant none
  6. // @version 1.2
  7. // @description Change the logo link from "/" to "/home"
  8. // @author roxy
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Function to change the href attribute
  17. function changeLogoLink() {
  18. document.getElementById('logo')?.setAttribute('href', '/home');
  19. }
  20.  
  21. // Run the function after the page has loaded
  22. if (document.readyState === 'loading') {
  23. document.addEventListener('DOMContentLoaded', changeLogoLink);
  24. } else {
  25. changeLogoLink();
  26. }
  27. })();