Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saitamanodoruji/1241330 to your computer and use it in GitHub Desktop.
Save saitamanodoruji/1241330 to your computer and use it in GitHub Desktop.
ぴくしぶすたっくふぃーどのいらすとをおおきくするよ
// ==UserScript==
// @name pixiv staccfeed illust larger
// @version 0.4
// @author retlet
// @namespace http://retlet.net/
// @description nya-n.
// @include http://www.pixiv.net/stacc/*
// @contributer saitamanodoruji
// ==/UserScript==
(function(){
GM_addStyle(<><![CDATA[
#wrapper,
header#global-header div.wrapper {
width: 1170px !important;
}
.ui-layout-east {
width: 984px !important;
}
.stacc_center_area {
width: 772px !important;
}
.stacc_main_timeline .stacc_ref_illust_img {
width: 500px !important;
}
.stacc_ref_illust_img > a > img {
max-width: 500px;
}
]]></>.toString());
function modifyIllusts(node) {
var illusts = document.evaluate('.//div[contains(concat(" ",normalize-space(@class)," ")," stacc_ref_illust_img ")]//img', node, null, 7, null);
for (i = 0; i < illusts.snapshotLength; i++) {
var illust = illusts.snapshotItem(i);
illust.src = illust.src.replace("_s.", "_m.");
}
}
document.body.addEventListener('DOMNodeInserted',function(evt){
var node = evt.target;
var requestURL = evt.newValue;
var parentNode = evt.relatedNode;
modifyIllusts(node);
}, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment