Proxer PicPreview

Zeigt Vorschaubilder in den Anime- und Mangalisten an

目前為 2017-05-07 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Proxer PicPreview
// @namespace    https://greasyfork.org/de/users/83349-deimos
// @version      0.1
// @description  Zeigt Vorschaubilder in den Anime- und Mangalisten an
// @author       Deimos
// @run-at       document-start
// @include      http://proxer.me/*
// @include      https://proxer.me/*
// @include      http://www.proxer.me/*
// @include      https://www.proxer.me/*   
// @require      https://greasyfork.org/scripts/12981-proxer-userscript-anker/code/Proxer-Userscript-Anker.js?version=108560
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        unsafeWindow
// ==/UserScript==

var pictureHeight = 100;

document.addEventListener('DOMContentLoaded', function(event) {
    function changefunction(change) //Ist das Script aktiviert?
    {
        if(GM_getValue("proxPics",0) == 1 ) //aktiviert     
        {
            if(window.location.pathname.split('/')[3] == "anime" || window.location.search === "?s=anime" || window.location.pathname.split('/')[3] == "manga" || window.location.search === "?s=manga")        
                showPics(1);     
        }
        else //deaktiviert
        {
            if(window.location.pathname.split('/')[3] == "anime" || window.location.search === "?s=anime" || window.location.pathname.split('/')[3] == "manga" || window.location.search === "?s=manga")
                showPics(2);
        }
    }
    //addAnkerMember(id, modulname, modus, changefunction, memoryName, memoryDefault, zusatz);
    addAnkerMember("proxPics_Anker","Proxer PicPreview",3,changefunction,"proxPics",1);
});

function showPics(type)
{
    var tables = document.getElementsByTagName("table");
    for(i = 0; i<tables.length;i++)
    {
        var tr = tables[i].rows;
        for(a = 2; a<tr.length;a++)
        {
            if(type==1)
            {
                var number = tr[a].children[1].children[0].href;
                number = number.substring(number.indexOf("info")+5);
                number = number.substring(0,number.indexOf("#top"));
                tr[a].children[0].children[0].height = pictureHeight;
                tr[a].children[0].children[0].src = "https://cdn.proxer.me/cover/"+number+".jpg";
            }
            else
            {
                tr[a].children[0].children[0].height = 20;
                tr[a].children[0].children[0].src = "/images/status/abgeschlossen.png";
            }
        }
    }
}