main  /  posts  /  2006  /  jan

To popup or not to popup


11 jan 06

One of my favorite things about del.icio.us is the posting interface. It automagically suggests tags for you, which you can click to add, and with the nifty Javascript bookmark, it of course brings the site title and URL along. The coup de grâce, however, is that this bookmarklet does not open a popup window: it simply works as a link. When you are done posting it returns you to the page you bookmarked. I love this nonobtrusiveness.

So, you’ll imagine my dismay when I started using Newsvine and I noticed their posting (“seeding”) bookmarklet opened in a popup window. Gross. Additionally, in Firefox on my PowerBook, for whatever reason, it pops under. Instead of being annoyed, I changed a couple of things to fix it.

(Side note: Newsvine is a kind of collaborative news site, CNN meets Digg sort of. When you post new articles to it, it’s called “seeding the vine.” I’d be happy to give out some invites; just let me know. It’s highly addictive.)

Here’s (my) del.icio.us bookmarklet code1:

javascript:location.href=’http://del.icio.us/minarets?v=2&url=’+encodeURIComponent(location.href)+’&title=’+encodeURIComponent(document.title)

Here’s the original Newsvine bookmarklet code:

javascript:u=location.href;h=document.title;void(window.open(‘http://www.newsvine.com/_wine/save?u=’+encodeURIComponent(u)+’&h=’+encodeURIComponent(h),’newsvine’,’toolbar=no,width=590,height=420’));

And here my new Newsvine bookmarklet:

javascript:location.href=’http://www.newsvine.com/_wine/save?u=’+encodeURIComponent(location.href)+’&h=’+encodeURIComponent(document.title)

It looks a little weird now, because the posting page was designed for the popup window, but it works. Also, Newsvine conveniently allows you to choose between returning to the article you have seeded or viewing the article’s page on Newsvine. I did a similar bookmarklet change for the Movable Type once, but the post page doesn’t return you to the page you bookmarked when you’re done.

1I had to put in some manual line breaks so the code wouldn’t break my layout.


lance  /  12 jan 2006  /  12:52 a.m.

you can add popoff=false … as in …

javascript:location.href=’http://www.newsvine.com/_wine/save?popoff=false&u=’+encodeURIComponent(location.href)+’&h=’+encodeURIComponent(document.title)

as it stands now however, that page won’t redirect you back to the page you were on. should probably add that in.

Arnoud  /  12 jan 2006  /  7:28 p.m.

Nice fix :) One request though: please change your default font because this page is unreadable in Windows.. (Lucida Sans is impossible to read without using Mac font smoothing - even with ClearType on, which I don’t use, it’s difficult to read)

Arnoud  /  12 jan 2006  /  8:10 p.m.

Wow that was fast! Thanks a lot :D

Maura  /  13 jan 2006  /  7:49 a.m.

Yeah, and thank you for leaving your real email address.