Created
February 20, 2011 18:12
-
-
Save eagletmt/836164 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 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