Sleazy Fork is available in English.

AniX.to Fullscreen Mod

Small script that adds faux fullscreen and theater mode


    // ==UserScript==
    // @name         AniX.to Fullscreen Mod
    // @namespace    http://tampermonkey.net/
    // @version      0.2
    // @description  Small script that adds faux fullscreen and theater mode
    // @author       Colt
    // @match        https://*.anix.to/anime/*
    // @icon         https://www.google.com/s2/favicons?sz=64&domain=anix.to
    // @grant        none
    // @license MIT
    // ==/UserScript==
     
    const sidebar = document.querySelector('aside.sidebar');
    const sidebarDisplayCached = sidebar.style.display;
    let sidebarShowing = true;
     
    const player = document.querySelector('#player');
    const playerCssCached = {
        'position': player.style.position,
        'top': player.style.top,
        'bottom': player.style.bottom,
        'left': player.style.left,
        'right': player.style.right,
        'overflow': player.style.overflow,
        'z-index': player.style['z-index']
    };
    let playerFullscreen = false;
     
    document.body.addEventListener('keyup', function (e) {
        if (e.code === "KeyT")
        {
            if (sidebar)
            {
                sidebarShowing = !sidebarShowing;
                sidebar.style.display = sidebarShowing ? sidebarDisplayCached : 'none';
            }
        }
        else if (e.code === "KeyF")
        {
            if (player)
            {
                playerFullscreen = !playerFullscreen;
     
                player.style.position = playerFullscreen ? 'fixed' : playerCssCached.position;
                player.style.top = playerFullscreen ? 0 : playerCssCached.top;
                player.style.left = playerFullscreen ? 0 : playerCssCached.left;
                player.style.bottom = playerFullscreen ? 0 : playerCssCached.bottom;
                player.style.right = playerFullscreen ? 0 : playerCssCached.right;
                player.style.overflow = playerFullscreen ? 'auto' : playerCssCached.overflow;
                player.style['z-index'] = playerFullscreen ? 1000 : playerCssCached['z-index'];
            }
        }
    });