Greasy Fork

Better Anime1

Provides better Anime1 UI experience

当前为 2021-12-23 提交的版本,查看 最新版本

// ==UserScript==
// @name         Better Anime1
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Provides better Anime1 UI experience
// @author       PoH98
// @match        https://anime1.me/*
// @icon         https://anime1.me/favicon-32x32.png
// @grant        none
// @run-at       document-body
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    let table = document.getElementById("tablepress-1");
    if(table != null){
        table.id = "";
        table.className = "";
    }
    let side = document.getElementById("secondary");
    if(side != null){
        side.remove();
    }
    let main = document.getElementById("primary");
    if(main != null){
        main.style.width = "100%";
    }
    let content = document.getElementById("content");
    if(content != null){
        content.style.minHeight = "calc(100vh - 238px)";
    }
    document.body.style.backgroundColor = "#000";
    let page = document.getElementById("page");
    let item = page.querySelectorAll("*");
    item.forEach(function(el){
        if(el.id.includes("ad") && !el.id.includes("head")){
            el.remove();
            return;
        }
        el.style.color = "#fff"
        el.style.backgroundColor = "#444";
    });
    if(window.innerWidth > 1280){
        let img = document.createElement("img");
        img.style.position = "fixed";
        img.style.bottom = "10px";
        img.style.right = "10px";
        img.src = "https://i.pinimg.com/originals/1c/79/ac/1c79ac50b06bb42a24058bf13c162a3e.gif";
        page.appendChild(img);
    }
})();