Masterani Placeholder

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

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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
    } 
}