Greasy Fork is available in English.

PTT Imgur Fix

修正 Imgur 在 PTT 上的問題

Tính đến 30-04-2023. Xem phiên bản mới nhất.

Tác giả
eight
Đánh giá
0 0 0
Phiên bản
0.8.0
Đã tạo
18-03-2017
Đã cập nhật
30-04-2023
Size
10 KB
Sự tương thích
Tương thích với Firefox Tương thích với Chrome
Giấy phép
MIT
Áp dụng cho

PTT Imgur Fix

Build Status

一個用於 PTT Web 版的 userscript。

在 2017/3/17 後,由於 imgur 封鎖來自 ptt.cc 的 referer,站方改用 imgur 所提供的 embed.js 做圖片嵌入。但是嵌入後的圖片是縮圖,對於 PC 使用者反而不如原始嵌入來得方便。

參考︰

Features

  • Disable embed script and use native img tag.
  • Embed imgur gifv links to display gif.
  • Embed imgur album (imgur.com/a/ or imgur.com/gallery/).
  • Add ":orig" to embeded twitter image with fallbacks.
  • Remove embeded youtube video.
  • Customize Youtube player parameters. See https://developers.google.com/youtube/player_parameters#Parameters.

Install

https://greasyfork.org/scripts/28264-ptt-imgur-fix

Compat notes

Changelog

  • 0.7.6 (Jan 2, 2023)

    • Fix: detect youtube live URL.
    • Fix: support imgur gifv extension.
  • 0.7.5 (Nov 23, 2022)

    • Fix: don't pollute history on Chrome when iframe is loaded (#23)
  • 0.7.4 (Jun 25, 2022)

    • Fix: image flickering on waterfox.
    • Fix: support timestamp in youtube embed.
  • 0.7.3 (Nov 5, 2021)

= Add: support youtube shorts.

  • 0.7.2 (Oct 30, 2021)

    • Enhance: rewrite lazy loader.
  • 0.7.1 (Oct 24, 2021)

    • Fix: video overflow in mobile devices.
  • 0.7.0 (Aug 18, 2021)

    • Fix: fallback to large images in twitter.
    • Fix: match URL with query.
    • Fix: failed to load imgur album.
    • Change: replace GM_config with GM_webextPref. You will loose the current setting. Support Greasemonkey 4.11.
  • 0.6.1 (May 30, 2021)

    • Fix: failed to load jpeg images.
  • 0.6.0 (Aug 14, 2020)

    • Fix: unable to load some galleries.
    • Fix: sometimes it is unable to load twitter images.
    • Breaking: imgur media are loaded according to file extension. the script will load video if the extension is .mp4.
    • Add: option to load imgur GIF as video.
  • 0.5.1 (Aug 7, 2019)

    • Add: support twitter mobile.
  • 0.5.0 (Mar 21, 2019)

    • Breaking: add lazy load option.
  • 0.4.3 (Nov 24, 2018)

    • Fix: failed to load images in Chrome.
  • 0.4.2 (Apr 13, 2018)

    • Add: youtube player parameters option.
  • 0.4.1 (Nov 26, 2017)

    • Use no-referrer for normal images. Some sites (e.g. gamer.com.tw) restricted referrer from ptt.
  • 0.4.0 (Sep 20, 2017)

    • Add embed imgur album option.
  • 0.3.1 (Jun 22, 2017)

    • Add embed image option.
  • 0.3.0 (Apr 1, 2017)

    • Fix: sometimes richcontent is not inserted in push content.
    • Fix: twitter pattern.
    • Fix: m.imgur.com is not matched.
    • Refactor, the original richcontent is always removed.
    • Add embedYoutube option.
    • 加入精華區 URL.
  • 0.2.1 (Mar 30, 2017)

    • Remove unused code.
  • 0.2.0 (Mar 30, 2017)

    • "gallery" is not a valid imgur id.
    • Add twitter image, expand to ...:orig.
    • Remove original .richcontent element.
  • 0.1.1 (Mar 19, 2017)

    • Compat with chrome.
  • 0.1.0 (Mar 19, 2017)

    • First release.