// ==UserScript== // @name pixiv direct original image link // @namespace pixiv // @version 1.3 // @description On page with thumbnails of all works makes thumbnails link to actual fullsize images // @homepage http://userscripts.org/scripts/show/135707 // @match http://www.pixiv.net/member_illust.php*id* // @match http://*.pixiv.net/img* // @run_at document_end // @run-at document-end // @grant none // @downloadURL none // ==/UserScript== if(document.location.hostname != "www.pixiv.net") // manga fix { if(document.referrer.indexOf("http://www.pixiv.net/member_illust.php?id=") == 0 && document.body.innerHTML.indexOf("This Page is Not Found") == 4) { var newpage = document.location.href.substr(document.location.href.lastIndexOf("/")+1); newpage = newpage.substring(0, newpage.indexOf('.')); document.location.replace("http://www.pixiv.net/member_illust.php?mode=manga&illust_id=" + newpage); } return false; } var allImgs, thisImg, src, txt, elmNewContent, profIMG, mangafix = false; profIMG = document.evaluate("//img[@class='user-image']", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.src; if(profIMG.indexOf("http://source.pixiv.net") == -1) { profIMG = profIMG.substring(0, profIMG.lastIndexOf('/')) + "/"; profIMG = profIMG.replace('profile', 'img'); } else // no avatar, use BG { var fn; var f = document.getElementsByTagName("style"); for(c=0;c