Created
April 22, 2011 11:31
-
-
Save retlet/936474 to your computer and use it in GitHub Desktop.
ぴくしぶすたっくふぃーどのいらすとをおおきくするよ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name pixiv staccfeed illust larger | |
// @version 0.2 | |
// @author retlet | |
// @namespace http://retlet.net/ | |
// @description nya-n. | |
// @include http://www.pixiv.net/stacc/* | |
// ==/UserScript== | |
(function(){ | |
GM_addStyle(<><![CDATA[ | |
.post-img { | |
float: none; | |
} | |
.post-img > a > img { | |
max-width: 500px; | |
} | |
]]></>.toString()); | |
function modifyIllusts() { | |
var illusts = document.evaluate('//div[contains(concat(" ",normalize-space(@class)," "), " post-img ")]//img[contains(@src,"pixiv.net/img")]', document, null, 7, null); | |
for (i=0; i<illusts.snapshotLength; i++) { | |
var illust = illusts.snapshotItem(i); | |
illust.src = illust.src.replace("_s.", "_m."); | |
//unsafeWindow.console.log(illust.src); | |
} | |
} | |
modifyIllusts(); | |
document.body.addEventListener('AutoPagerize_DOMNodeInserted',function(evt){ | |
var node = evt.target; | |
var requestURL = evt.newValue; | |
var parentNode = evt.relatedNode; | |
modifyIllusts(); | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment