Skip to content

Instantly share code, notes, and snippets.

@motemen
Created June 20, 2009 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motemen/133228 to your computer and use it in GitHub Desktop.
Save motemen/133228 to your computer and use it in GitHub Desktop.
addBefore(Tumblr, 'post', function (ps) {
if (ps.itemUrl.match(/^http:\/\/img\d+\.pixiv\.net\/img\/([^\/]+?)\/\d+_m\.\w+$/)) {
ps.itemUrl = ps.itemUrl.replace(/_m(\.\w+)$/, '$1');
}
if (ps.pageUrl.match(/^http:\/\/www\.pixiv\.net\/member_illust\.php\?mode=big&illust_id=\d+$/)) {
ps.pageUrl = ps.pageUrl.replace(/mode=big/, 'mode=medium');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment