Greasy Fork is available in English.

Resize Image On "Open image in new tab"

Support: Google(blogspot YouTube)\Tumblr\Twitter\Steam(Only user content)\ArtStation\Pinimg\Weibo\Reddit (And more...

< Feedback on Resize Image On "Open image in new tab"

Question/comment

§
Posted: 30. 07. 2023

twitter 好像不能用了

§
Posted: 01. 08. 2023
Edited: 01. 08. 2023

推特的预览图变成了webp格式,而推特没有webp格式的原图只有预览图,所以导致失效。Workaround:点击图片进大图之后再右键

§
Posted: 01. 08. 2023

恩 自己隨便修改好了..

twitter 部份這樣改


//twitter
else if( (m = url.match(/^(https?:\/\/\w+\.twimg\.com\/media\/[^\/:]+)\.(jpg|jpeg|gif|png|bmp|webp)(:\w+)?$/i)) ) {
    var format = m[2]; if(m[2]=="jpeg") format = "jpg";
  if(format ==='webp') document.location = m[1] + "?format=" + format + "&name=large";
    else document.location = m[1] + "?format=" + format + "&name=orig";
}
else if( (m = url.match(/^(https?:\/\/\w+\.twimg\.com\/.+)(\?.+)$/i)) ) {
    var pars = getQueryParams(document.location.search);
    if(!pars.format || !pars.name) return;
    if(pars.name == "orig") return;
  if(pars.format ==='webp' && pars.name ==='large') return;
  if(pars.format ==='webp') document.location = m[1] + "?format=" + pars.format + "&name=large";
  else document.location = m[1] + "?format=" + pars.format + "&name=orig";
}

Post reply

Sign in to post a reply.