andrewducker: (Juggling)
andrewducker ([personal profile] andrewducker) wrote2011-04-30 09:13 pm

The Thing What I Wrote

I spent the afternoon grappling with Javascript, writing my very first Firefox addon.

I repost images on Livejournal/Dreamwidth a lot, and I'm not the only one. And I've noticed that I tend to forgot the alt text (and title text) when I do that.

So what would be very handy is if I could right-click on an image and select "Copy Image Source" and get the image, complete with any information that was in the IMG tag.

And so I wrote one.

You can get it here if you think it would be useful.

And if you have any feedback on improvements to it, just let me know. It's trivially simple, but that doesn't mean I've missed something obvious that would make it better for some people.
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2011-05-01 03:44 am (UTC)(link)
Ooh, nice. I had a copy image source addon ages back, but it stopped being updated and died. Nice one.

Test:
Juggling

Excellent.
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2011-05-01 03:46 am (UTC)(link)
Oh, one thing, no idea how, but it's right at the bottom of my now rather long context menu (need to trim some of that, especially bad for images that are links), being able to move it, or just have it appear with the rest of the copy/edit stuff would be good. It must be possible, because COLT appears there.
simont: A picture of me in 2016 (Default)

[personal profile] simont 2011-05-01 07:14 am (UTC)(link)
I idly wonder if it might be a good idea to have it default to also pasting a line of text after the image saying something like "(copied from <a href="original page source">here</a>)". Both to gently hint that giving credit is polite to people who tend to forget that, and to make life (even) easier for those who were planning to anyway.

(Of course for your example case of xkcd people are hardly going to fail to recognise where it's from, but...)
tysolna: (fry cap)

[personal profile] tysolna 2011-04-30 08:30 pm (UTC)(link)
... while recuperating from a cold. My hat's off to you, Sir.

[identity profile] marrog.livejournal.com 2011-04-30 10:39 pm (UTC)(link)
That's pretty awesome. Does it copy the height and width, too? It's only polite, after all...
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2011-05-01 03:44 am (UTC)(link)
It does if it's defined in the image it's copying, but not if not, from what I can see.

[identity profile] marrog.livejournal.com 2011-05-02 08:42 pm (UTC)(link)
Looks good. Outputs an upper-case 'A' in the tag, but I suspect only I would be irritated by such a thing.

[identity profile] marrog.livejournal.com 2011-05-02 08:42 pm (UTC)(link)
Also irritating: height before width. Wrong way round. Was confused for a moment.

[identity profile] theweaselking.livejournal.com 2011-04-30 11:41 pm (UTC)(link)
Useful if you're going to hotlink, but unfortunately not the greatest choice for me. Still, neat!

[identity profile] johncoxon.livejournal.com 2011-05-01 11:14 am (UTC)(link)
I'd much rather people used hyperlinks :(

[identity profile] johncoxon.livejournal.com 2011-05-01 12:50 pm (UTC)(link)
I think it would be better to link back to the original source with webcomics and the like. Photographs etc are different.