cc licensed ( BY NC SA ) flickr photo shared by EMSL

In the carefully controlled laboratory where I do my coding… no in actuality more like a scene from some ghastly middle school cafeteria food fight.

This all started when Giulia showed me a creative commons licensed photo that my creative commons attribution script helper (for Chrome) (for Firefox/Safari) (For IE) failed to do its magic.

On dissecting the page structure I found the issue. My script was assembling all th enifo properly, but the XPath pattern I was looking for was not found– up til now my code looked to insert after the “tags” block on a flickr page, but this page was one where the owner had disabled tags (why, why, he open asks in frustration). In comparing a fe wplaces, it looked like a better spot to do this was below the “Additional Info” block.

I opened Firefox to test this, since I can jump right in to the script editor, and got it working. I uploaded the revised script to the UserScripts site, and then reviewed my own notes on how to get it into the Chrome Store. It looked good, everything worked.

Short note for Chrome users, sadly there is no update button, so you have to delete the old extension, go to the Chrome Store, and re-install it.

Then I wondered, is this worth blogging about? It’s rpetty minor, and I bet almost no soul on earth cares about this minute detail.

But blogging the process is important, even when I am still two days behind on grading my own students blogging (because they blogged so well, now I have more to read). And in even more irony, Giulia asked if I would use a photo with this post. “N, I probably will just do a screenshot.” But then I thought, why not? So I found the image above.

Oops.

It was lacking my attribution insertion.

Because the photo had no “Additional Info” provided.

So I went back to the lan again, and moved the inserted content to come after the License block.

Lather.

Rinse.

Repeat.

So if I had not decided to blog, and if I had not decided to include a photo in the blog (where I use my own script for the attribution), I would have missed my second goof.

Maybe there are reasons for things happening.

And thus, you can all see how datn efficiently I work.

But now version 0.53 of my scripts are available, for Chrome or for Firefox/Safari.

I think it’s time for a nap.


cc licensed ( BY NC ND ) flickr photo shared by danncer

UPDATE Feb 5 (later): I will beed to do more tinkering to make this a Safari Extension; Apple has its own hoops to jump through. I previously was able to install the Firefox script version using GreaseKit

Profile Picture for Alan Levine aka CogDog
An early 90s builder of the web and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person.

Comments

  1. Definitely worth blogging about. I tried getting this running a couple weeks back, ran into some roadblock, and didn’t get back to it.

    Having just read your post, I was reminded again to install this, and now have it running in Firefox(along GreaseMonkey, which I used to have this installed years back when I did more web coding). Chrome seems to have balked (“download was not a CRX”), but I will try next with Safari.

    Thanks, Alan. All posts are worth sharing. And reading.

    cc licensed ( BY NC SA ) flickr photo shared by aforgrave

    Just testing.

    1. Safari is going to be a huge PITA, I have to figure out out to build it as an extension. Previously I used an addon called GreaseKit which enabled Greasemonkey scripts. I just wasted an hour trying to walk through the Apple developer labyrinth

Leave a Reply

Your email address will not be published. Required fields are marked *