Open thelastfantasy opened 7 years ago
{
"type": "redirector",
"ns": "nonymous",
"author": "pks",
"prefix": "tumblr large image",
"match": "^http://\\d+\\.media\\.tumblr\\.com/.*_[45]00\\.(?:jpg|png|gif)$",
"static": true,
"pattern": "_[45]00\\.(jpg|png|gif)",
"replacement": "_1280.$1"
}
After some modifies it's OK now.
Keep in mind not all images have a 1280 variant (at least older pages?), so this could toss errors. If I could reliably figure out the highest resolution image without expanding code noticeably, I'd add it to the post Javascript... Maybe it is possible. I do want the code adjusted eventually, anyway, since I'm unhappy with how it locates videos.
My plugin:
Match URL: http://66.media.tumblr.com/6b667f014d83a46bc71d1e51827e99bd/tumblr_oglaj2Ytsp1sfv6buo1_500.jpg Hoped Result: http://66.media.tumblr.com/6b667f014d83a46bc71d1e51827e99bd/tumblr_oglaj2Ytsp1sfv6buo1_1280.jpg
But I only got this, I only know something about regular expression but nothing about coding, can you tell me where is the error?