Masterani Placeholder

Loads badass Luffy as a placeholder if original image doesn't load (under recent anime)

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Masterani Placeholder
// @description  Loads badass Luffy as a placeholder if original image doesn't load (under recent anime)
// @version      1.1
// @namespace    https://greasyfork.org/users/5141
// @license      WTFPL v2
// @include	 http://www.masterani.me/
// ==/UserScript==

window.onload = function SetImgId()
{
    var imgArray = document.getElementsByClassName("lazy");
    for (var i = 0; i < imgArray.length; i++)
    {
        imgArray[i].id = "img" + i;
        if (document.getElementById(imgArray[i].id).naturalWidth === 1) //note: if image doesn't load naturalWidth === 1
            imgArray[i].src = "http://oi62.tinypic.com/2zoer7s.jpg"; //set your prefered pic
    } 
}