Imgur direct image/media page without HTML

Prevents Imgur from redirecting direct media URLs to their HTML page, keeping the correct file extension for images, GIFs and videos. Thanks to /u/american_spacey (https://www.reddit.com/r/firefox/comments/1exswyv/comment/lja7yc7/) for improvements.

这是此脚本的所有版本。 只显示代码更新过的版本

  • v2.0 2024-08-25

    Version 2.0 - [August 25, 2024]

    Enhancements (Thanks to /u/american_spacey):

    • Simplified Code Structure:
      Refactored the script to use async/await for improved readability and maintenance.

    • Optimized Content-Type Handling:
      Implemented a loop to efficiently check and redirect based on available content types (GIF, MP4, JPEG, PNG).

    • Reduced Code Redundancy:
      Combined multiple checks into a single streamlined process, reducing the overall lines of code.

    • Performance Improvement:
      Enhanced performance by breaking the loop once the correct content type is found, minimizing unnecessary checks.

  • v1.0 2024-08-20