Hianimez slight Enhancer

Set logo link to /home and show scroll-to-schedule button only on /home. Credit to https://greasyfork.org/en/scripts/512499 for making this before I did. just added the button for convienyance.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Hianimez slight Enhancer
// @namespace    http://tampermonkey.net/
// @version      1.6
// @description  Set logo link to /home and show scroll-to-schedule button only on /home. Credit to https://greasyfork.org/en/scripts/512499 for making this before I did. just added the button for convienyance.
// @match        *://hianime.to/*
// @grant        none
// @run-at       document-start
// @author       NickTh3M4l4chi and ChatGPT
// ==/UserScript==

(function() {
    'use strict';

    // Wait for #logo to exist before setting href
    const logoCheck = setInterval(() => {
        const logo = document.getElementById('logo');
        if (logo) {
            logo.setAttribute('href', '/home');
            clearInterval(logoCheck);
        }
    }, 100); // check every 100ms

    // Only add the button if on /home
    if (window.location.pathname === '/home') {
        window.addEventListener('load', () => {
            const button = document.createElement('button');
            button.innerText = 'Jump to Schedule';
            button.style.position = 'fixed';
            button.style.bottom = '20px';
            button.style.left = '20px';
            button.style.padding = '10px 15px';
            button.style.zIndex = '9999';
            button.style.border = 'none';
            button.style.borderRadius = '6px';
            button.style.backgroundColor = '#007BFF';
            button.style.color = '#fff';
            button.style.cursor = 'pointer';
            button.style.boxShadow = '0 4px 8px rgba(0,0,0,0.2)';
            button.style.fontSize = '14px';

            button.onclick = () => {
                const target = document.querySelector('#schedule-block > section');
                if (target) {
                    target.scrollIntoView({ behavior: 'smooth' });
                }
            };

            document.body.appendChild(button);
        });
    }
})();