Kemono.party Image Full Size Autoloader

Auto load full size image in kemono.party

// ==UserScript==
// @name        Kemono.party Image Full Size Autoloader
// @name:zh-TW Kemono.party自動載入完整圖片
// @description Auto load full size image in kemono.party
// @description:zh-tw 在kemono.su的Post自動載入完整大小的圖片
// @match     https://kemono.su/*/user/*/post/*
// @match https://kemono.su/*/user/*/post/*
// @version     1.2.0
// @namespace   andyching168.scripts
// @author      andyching168
// @license     MIT License
// @run-at      document-start
// @grant GM_log
// ==/UserScript==


var G=0;

setTimeout(R, 1000);
function R() {
    G=document.querySelector("#page > div > div.post__files").childElementCount


for (var i = 1; i <= G; i++) {
          document.querySelector("#page > div > div.post__files > div:nth-child("+i+") > figure > a > img").src=document.querySelector("#page > div > div.post__files > div:nth-child("+i+") > figure > a ").href;
}

}