Skip to content

Instantly share code, notes, and snippets.

@eagletmt
Created February 20, 2011 18:12
Show Gist options
  • Save eagletmt/836164 to your computer and use it in GitHub Desktop.
Save eagletmt/836164 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name pixiv vertical listing
// @namespace http://d.hatena.ne.jp/eagletmt/
// @include http://www.pixiv.net/tags.php*
// @include http://www.pixiv.net/search.php*
// @include http://www.pixiv.net/bookmark_new_illust.php*
// @description こんなかんじに縦に表示 http://gyazo.com/361f385af3df45064658f8ed671f8e0c
// ==/UserScript==
(function() {
GM_addStyle([
'.search_a2_result li { float: none; width: auto; }',
'.search_a2_result a { font-size: large; }',
].join(''));
window.addEventListener('AutoPagerize_DOMNodeInserted', function(evt) { replaceImages(evt.target); }, false);
replaceImages(document.querySelector('.search_a2_result'));
function replaceImages(target) {
Array.prototype.forEach.call(target.getElementsByTagName('img'), function(img) {
img.src = img.src.replace(/_s(\.\w+$)/, '_m$1');
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment