Using getSelection() with content in frames

Sunday 12/28/2008  –  Category: Uncategorized  –  No Comments

An iPhoneSender user recently reported a bug with the Safari bookmarklet not correctly grabbing the selection and suspected it was because the selected content was in frames.

After some digging around, it turns out he was right--if your selection is in a frame, the normal window.getSelection() method will return nothing; you'll need to target the specific frame instead.  We don't know the frame's name so we can't target it with parent.frames["framename"], but what we can do is just loop over all the frames in the document until we find it.

(simplified and expanded):


Follow Flickr Original on twitter for status updates

(UPDATE: Version 1.0.5 available!)
(UPDATE: Version 1.0.4 available!)

(UPDATE: New and improved version 1.0.3 available!)


(UPDATE: Firefox 3.5 version available!)

I  love Flickr, but sometimes their interface gets in the way and stuff takes more clicks that I'd like.  One thing I like to do is view/download original size images with one click.

After doing some preliminary research, I found that out that you used to be able to figure out the url of the original image based on Flickr's standard url structure...but it seems Flickr has closed the loophole.  Bummer.

My extension extracts the url of the image you select, parses out the image id, and sends it to a simple web service that uses the Flickr API to return the url of the original image.

Let me know how it works for you!

Download
Flickr Original 1.0.2

  • Updated to be compatible with Firefox 3.5

Flickr Original 1.0.1

  • Added "View Original Flickr Image" option
  • View/download options now only show up on valid Flickr photos
  • Web service now returns the largest sized image available (for example, it will return the large version if the original isn't available)

Usage
After downloading and installing you'll be asked to restart Firefox.  Do it.

While on Flickr, just right-click on the thumbnail you want to download full-size and select "Download Original Flickr Image".  That's all!

Caveats
This won't work on images that the  photographer has marked "All Rights Reserved" or has disabled downloading.

My inbox was getting cluttered with work-related stuff, so I decided to push it to a separate Gmail account.  Now Gmail has a nifty "Forward all" feature for single conversations, but doesn't provide a way to forward multiple conversations at one time.

After Googling for a bit, someone suggested using a mail client and IMAP.

  1. Make sure IMAP is enabled on both accounts (Settings > Forwarding and POP/IMAP)
  2. Add both of your accounts to your preferred mail client.  Apple Mail worked fine for me.
  3. Now you can drag and drop whatever you need between the two accounts.  Voila!

swfobject error in IE and WordPress

Friday 12/5/2008  –  Category: Uncategorized  –  No Comments

I ran into a minor annoyance today with a JS error popping up in IE:

'J.parentNode' is null or not an object

It turns out that a couple plugins that were active (nextgen-gallery and flash-video-player) were both including the swfobject.js in the header.  Solution: disable one of the plugins.  If you really need both plugins, the other alternative would be to statically include your plugin files in header.php rather than relying on the wp_head(); function.

Adium Top Words (part 2)

Wednesday 12/3/2008  –  Category: Uncategorized  –  1 Comment


I decided to use Shoes (a Ruby graphics toolkit) to create a GUI to make it easier so you don't have to open terminal at all.

Try it!

 Page 9 of 14  « First  ... « 7  8  9  10  11 » ...  Last »