bbs.mottoki.com image url replacer

bbs.mottoki.com image url replacerは画像一覧頁のurlをオリジナルフルサイズ画像のurlに差し替えますhttp*://bbs.mottoki.com/index*で動作します

اعتبارا من 26-01-2020. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey 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 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.

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

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

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name     bbs.mottoki.com image url replacer
// @version  1
// @grant    none
// @include  http*://bbs.mottoki.com/index*
// @description bbs.mottoki.com image url replacerは画像一覧頁のurlをオリジナルフルサイズ画像のurlに差し替えますhttp*://bbs.mottoki.com/index*で動作します
// @description:ja bbs.mottoki.com image url replacerは画像一覧頁のurlをオリジナルフルサイズ画像のurlに差し替えますhttp*://bbs.mottoki.com/index*で動作します
// @namespace https://greasyfork.org/users/10885
// ==/UserScript==
// exampleurl http://bbs.mottoki.com/index?bbs=kimottamakaasann&act=album&thread=&page_album=27
// exampleurl http://bbs.mottoki.com/index?bbs=kimottamakaasann&act=img&img=4965
// exampleurl http://bbs.mottoki.com/img/kimottamakaasann/1578698682-9zq398.jpg

var i = 0;
var j = 0;
var url_org = "";
var url_mod = "";
var t = [];
var u = [];

t = document.getElementsByTagName("a");
u = document.getElementsByTagName("img");

for (i = 32; i < 82; i++) {
    if (t[i] != null || t[i] != undefined) {
        console.log("i = " + i);
        if (t[i].getAttribute("href") != null || t[i].getAttribute("href") != undefined) {
            if (t[i].getAttribute("href").includes("/index?bbs=kimottamakaasann&act=img&") === true) {
                for (j = 1; j < 25; j++) {
                    console.log("j = " + j);
                    if (u[j] != null || u[j] != undefined) {
                        if (u[j].getAttribute("src") != null || u[j].getAttribute("src") != undefined) {
                            if (u[j].getAttribute("src").includes("img/kimottamakaasann/s/") === true) {
                                url_org = u[j].getAttribute("src");
                                url_mod = url_org.replace(/\/s\//, "/")
                                console.log("url_org = " + url_org + "|" + "url_mod = " + url_mod);
                                t[i].setAttribute("href", url_mod);
                            }
                        }
                    }
                }
            }
        }
    }
}