Bitcoin Forum

Other => Meta => Topic started by: EcuaMobi on February 27, 2018, 05:32:09 PM



Title: Improved images on the forum - Tampermonkey/Greasemonkey user script
Post by: EcuaMobi on February 27, 2018, 05:32:09 PM
Lately I've been learning/playing with userscript (shortening URLs (https://bitcointalk.org/index.php?topic=3001846.0), modified grue's merit script (https://bitcointalk.org/index.php?topic=2833350.msg30923337#msg30923337)) so here's my latest addition.

This userscript uses rsz.io (https://rsz.io/) as a proxy for images instead of the native ip.bitcointalk.org which can take several seconds to load and has some limitations.
Additionally, big images are reduced to improve readability of threads. By default the max width is 600px and the max height is 400px, but that can be easily modified on the script.
When hovering the reduced image the full version will be shown.

Reduced images load almost instantly and full resolution images are preloaded so the hovering works as smoothly as possible.
As a result everything loads much faster and threads with several images are easier to read.

For example, this thread:
https://bitcointalk.org/index.php?topic=1800909.0
is converted to this:
https://i.imgur.com/M2jBFm6.png (https://i.imgur.com/GdHbDaa.png)

Here's a more extreme example where you can test this script:
https://bitcointalk.org/index.php?topic=3012663.msg31190942#msg31190942



To install this script get Tampermonkey (https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) on Chrome, Greasemonkey (https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) on Firefox, or Violentmonkey (https://addons.opera.com/extensions/details/violent-monkey/) on Opera (Read more here: https://openuserjs.org/about/Userscript-Beginners-HOWTO) and then install this:
https://openuserjs.org/scripts/EcuaMobi/Bitcointalk_images

If you want to change the max size for images, just open the code of the script after installing it and update MAX_WIDTH and/or MAX_HEIGHT


Title: Re: Improved images on the forum - Tampermonkey/Greasemonkey user script
Post by: Jet Cash on February 27, 2018, 08:03:06 PM
preloading large images still wastes bandwidth for users on mobiles or tethered to mobiles.


Title: Re: Improved images on the forum - Tampermonkey/Greasemonkey user script
Post by: EcuaMobi on February 27, 2018, 08:25:22 PM
preloading large images still wastes bandwidth for users on mobiles or tethered to mobiles.
Indeed. There isn't any improvement regarding saving bandwidth. The target of this userscript is to improve usability instead.
If you want to save bandwidth (at the cost of the hovering not working so smoothly) just comment or remove the 2 lines below "// Preload full image"
https://i.imgur.com/x0rP9J3.png

I'll probably add a boolean constant for that purpose on the next version.


Title: Re: Improved images on the forum - Tampermonkey/Greasemonkey user script
Post by: Cluster2k on March 24, 2018, 09:07:15 PM
Nice one, going to try it out. Hating those load times of bct large images even with a 100mbps connection.


Title: Re: Improved images on the forum - Tampermonkey/Greasemonkey user script
Post by: omer-jamal on July 10, 2019, 01:31:52 PM
Thanks, this is what I needed Currently, but unfortunately it seems 'rsz.io' Down Right Now (https://www.isitdownrightnow.com/rsz.io.html) Is there a solution to overcome this problem?


Title: Re: Improved images on the forum - Tampermonkey/Greasemonkey user script
Post by: Timelord2067 on July 26, 2020, 02:59:27 AM
Thanks, this is what I needed Currently, but unfortunately it seems 'rsz.io' Down Right Now (https://www.isitdownrightnow.com/rsz.io.html) Is there a solution to overcome this problem?

I've just come across this page and tried the script - install was straight forward as I already have another BCT script to count merits, so that was good.  Once installed however all images on the example page (including @EcuaMobi image to show where to cut script which isn't a large file now don't load.

@EcuaMobi has been offline for 49 days so far, but I'll send him a PM to advise the script / images aren't working.

If anyone is using the script I suggest you disable it until such time as a resolution is found.