Image galleries and writing a browser extension 🖼️

"I hacked up a quick thing" overlapping with "The web sucks" - there's a Venn diagram of the perfect Gemini post!

Lots of web sites have photo galleries. I'm interested in photography, so I see a lot of them. They suck. They give you animated transitions and fancy navigation and social media widgets and fancy borders and I JUST WANT TO LOOK AT THE PICTURES. Sometimes you can tell the browser (say, by right-clicking a thumbnail link) to open an image in another tab and so just get the image and no flim-flam. So I thought "I could make a browser extension to do that: open all the images in a gallery, one per tab."

The first problem was that I knew nothing about browser extensions, but I've fixed that. I added a toolbar icon which injects a script to find the URLs of the images, and then opens them each in a tab. I had to learn some Javascript, and I had to learn about extension APIs, but it wasn't too hard. I got it working in Firefox one way and Chrome/Vivaldi another way.

The second problem is that the web sucks. There are thousands of ways to make an image gallery, and there's no way I can do something generic to identify the right URLs to open. So I've written something that can only ever handle a fraction of the sites where it would be useful.

Never mind. I enjoyed doing it.

=> #galleries | #javascript

=> back to gemlog

Proxy Information
Original URL
gemini://freeshell.de/gemlog/2023-05-08_Image_galleries_and_writing_a_browser_extension.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
103.889854 milliseconds
Gemini-to-HTML Time
0.404634 milliseconds

This content has been proxied by September (ba2dc).