I'm Aza Raskin @aza. I make shiny things. I simplify.

I'm VP at Jawbone, focusing on health.

 

Ubiquity Tutorial: Turn Bookmarklets Into Commands

Bookmarklets are clickable actions (technically a link containing some Javascript) that can be added to the bookmarks bar of your browser. They’re a good way of getting control of the web back into users hands, by allowing them to add whatever new functionality they want to the websites they visit.

The main problem with bookmarklets is that they don’t provide a scalable solution for accessing their functionality. You can only have so many buttons on the toolbar before they become an unusable outbreak of pimples that clutter the browser’s interface.

With a new utility function in Ubiquity, it’s now trivial to turn any bookmarklet into a Ubiquity command. Here’s a short video tutorial on how to do it:

Here’s the source code for the command in the video. The bookmarklet comes from here.


CmdUtils.makeBookmarkletCommand({
name: "Embed Flickr Photo",
url: "javascript:(function(){if(window.page_p)window.open('http://www.elsewhere.org/mbedr/?p='+window.page_p.id);%20else%20alert('No%20Flickr%20photo%20found.');})()"
})

If you’ve got any favorite bookmarklets or great bookmarklet-based commands, put ‘em in the comments.

RT @aza Ubiquity Tutorial: Turn Bookmarklets Into Commands | Follow @aza on Twitter | All blog posts

View all 86 comments



Athan

Hy Aza, i m for the unable to download ubiquity 0.1.2 …
on the wiki …
Whatever, nice new utility …

Thanks

Athan


@Athan: That’s because we are releasing Ubiquity 0.1.2 tomorrow. Overly optimistic timing on my part :)



Gabriel

Here’s a list of bookmarklet commands sorted by usage: http://queri.ac/commands/bookmarklets?sort=down_by_queries_count_all
You can mouseover the name links to see the urls or just click on them individually



Ian

Share on friendfeed


This is excellent! I never use bookmarks – except for bookmarklets. This seems like a much better way to use bookmarklets. Can’t wait to try it out.



Athan

Hy Aza,

thanks for the release. I never wrote a line of command and create my first command thanks to these new ubiquity feature.

it’s “clip to evernote”. I shared it on gist.

Thanks a lot

Athan



Adrien

Great!
Is the opposite possible?
Do you have a clue how to execute ubiquity command from bookmarklet?


Interesting. But there’s a snag. For bookmarklets that open Windows, Firefox blocks it every time.

For example, try

CmdUtils.makeBookmarkletCommand({
name: “TwitSnip”,
url:”javascript:void(open(‘http://twitter.grader.com/twitsnipsave.php?Title='+escape(document.title)+'&Text='+escape(document.selection?document.selection.createRange().text:(window.getSelection?window.getSelection():(document.getSelection?document.getSelection:”)))+’&Referrer=’+escape(document.referrer)+’&URL=’+escape(location.href),’TwitSnip%20from%20Twitter.Grader.com’,'scrollbars=no,width=550,height=350,top=175,left=75,status=yes,resizable=yes’))”
})

How does one work around that?


Wow, thanks for adding this capability! I have particularly wanted to add the Evernote bookmarklet; now I have it. I do think, however, that you could take it one step further and make this feature really user-friendly. Make it so you can just drag’n'drop the bookmarklet into the Ubiquity command box. Wouldn’t that be a lot nicer?


oops, I futzed my link. this one should work.



Aza Raskin

@Mskadu Hmm. That is indeed a problem. Can you submit a bug report on that. Thanks!

@Athan, thegeniusfiles: That’s spectacular! Enabling everyone to be able to make their browser do what they want is what Ubiquity is all about.

@Adrien: It isn’t currently possible to call a Ubiquity command from a bookmarklet. That’s because bookmarklets run in content space, and Ubiquity requires full chrome privileges.



boardraider

I stumbled over a small problem using your code alongside the NoScript extension.
NoScript allows using Bookmarklets even on untrusted sites (JavaScript is disabled there). The provided Ubiquity code breaks this.

As a workaround I personally use this code:
http://code.google.com/p/boardraider-ubiquity-commands/wiki/BookmarkletsToCommands


Shouldn’t you be writing an Ubiquity command to automatically create an Ubiquity command from a selected bookmarklet? :)



Aza Raskin

@Endolith: You are absolutely right. In fact, Ubiquity can just automatically scan your bookmarks, looking for a bookmarklet and add them as a Ubiquity command.


I was imagining a command that would automatically read a bookmarklet on the web (like the Mbedr link you clicked on) and convert it into a command, instead of making you type it manually.

But yes, indexing all the user’s bookmarklets and Quick Searches and Quick Search bookmarklets that have keywords and converting them into commands would also be good.

http://getsatisfaction.com/mozilla/topics/using_bookmarks_with_keywords_in_ubiquity

http://www.endolith.com/wordpress/2007/02/10/quick-search-bookmarklets/


I don’t know why but following your tutorial doesn’t work for me. My bookmarklet commands do not become ubiquity commands. What am I doing wrong?



Ivan

Hello, I’m trying to transform imageshack.us bookmarklet (http://reg.imageshack.us/content.php?page=transloader) to Ubiquity command, but it doesn’t work. Can you please check this out? Thanks.



yudi

Hi Aza,

First of all thank you.

I just want to bring to your notice that when I try to add the following two bookmarklets something goes wrong.

CmdUtils.makeBookmarkletCommand({
name: “print whatyoulike”,
url: “javascript:(function(){if(window['ppw']&&ppw['bookmarklet']){ppw.bookmarklet.toggle();}else{window._pwyl_home=”http://www.printwhatyoulike.com/”;_pwyl_bmkl=document.createElement(‘script’);_pwyl_bmkl.setAttribute(‘type’,'text/javascript’);_pwyl_bmkl.setAttribute(‘src’,_pwyl_home+’static/compressed/pwyl_bookmarklet_10.js’);_pwyl_bmkl.setAttribute(‘pwyl’,'true’);document.getElementsByTagName(‘head’)[0].appendChild(_pwyl_bmkl);}})();”
})

CmdUtils.makeBookmarkletCommand({
name: “printerfriendly”,
url: “javascript:(function(){function%20linkIsSafe(h){return(!/^mailto:/.exec(h)&&!/^javascript:/.exec(h));}%20var%20i,x,h;%20for(i=0;x=document.getElementsByTagName(‘a’)[i];i++)%20{%20h=x.innerHTML.toLowerCase();%20if(h.indexOf(‘print’)>-1%20&&%20h.indexOf(‘edition’)==-1%20&&%20h.indexOf(‘subscri’)==-1%20&&%20h.indexOf(‘reprint’)==-1%20&&%20h.indexOf(‘slogan’)==-1%20&&%20linkIsSafe(x.href))%20{%20x.focus();location=x.href;return;%20}}%20alert(“Can’t%20find%20link%20to%20printer%20friendly%20version.”);})()”
})

I successfully added five bookmarklets but not these two. They both deal with print function.

Appreciate your work.

Yudi



JS

Many thanks. Will turn my pornzilla bookmarklets into Ubiquity commands now. But then, you did too. You just didn’t tell us about it. ;) Flickr… pfft! :)


This is excellent! I never use bookmarks – except for bookmarklets. This seems like a much better way to use bookmarklets. Can’t wait to try it out.


But yes, indexing all the user’s bookmarklets and Quick Searches and Quick Search bookmarklets that have keywords and converting them into commands would also be good.



Sex

This is excellent! I never use bookmarks – except for bookmarklets. This seems like a much better way to use bookmarklets. Can’t wait to try it out.


Given the impact of the downturn mens belts in the labor market, GHD, has undergone many workers cheap gucci belts have no other choice, fixed-term cheap louis vuitton belts for men employment or agency. Therefore, some could change from low labor costs cheap desiger belts all on a regular basis. In other words, if they could gucci belts on sale move louis vuitton belts cheap from poverty to escape C temporarily. The charity says that government policy and legislation, MBT, on the basis of the phenomenon and requires change, including improved rights and conditions for employees to wear.


Thanx admins. good post


With a new utility function in Ubiquity, it’s now trivial to turn any bookmarklet into a Ubiquity command. Here’s a short video tutorial on how to do it:


FYI: Ubiquity is not working on the most recent versions of Trunk aka Minefield aka Firefox 3.1b2pre. There have been many patches landing lately. One or more of them has likely borked things.


Here’s the source code for the command in the video. The bookmarklet comes from here.


thnks
gooooood



Corey

Thanks for the tip and tutorial, I just used it to create a command for Instapaper Read Later and it works great!


China wholesale beads store, free shipping, and very good post really


I never wrote a line of command and create my first command thanks to these new ubiquity feature.


thnks
goooooooooooood
min:)ااا


I’m not sure the place you are getting your information, however good topic. I must spend a while studying more or figuring out more. Thanks for excellent information I used to be on the ugg lookout for this information for my mission.


I like the valuable information you provide in your articles. I抣l bookmark your blog and check again here regularly. I am quite certain I抣l learn plenty of new stuff right here! Best of luck for the next!


article on this site very useful. thanks – Sedang mencari rumah minimalis ? baca artikel tentang Info rumah minimalis secara gratis


Merely need to state your own post is really as amazing. The actual lucidity inside your set up is merely good as well as i will assume you are educated with this topic.


Howdy. Very nice blog!! Guy .. Beautiful .. Wonderful .. I’ll bookmark your blog and take the feeds additionally…I am satisfied to locate so much useful information right here within the article. Thanks for sharing …


Super blog post, I count on updates by you.


Far, this post is really sweet about this important topic. I am in harmony with the conclusions and are greedily looking forward to the update entry. Saying thank you will not just be sufficient, for the wonderful clarity in your writing. I will immediately grab your rss feed to stay informed of any updates. Wonderful work and much success in your business dealings! Please excuse my poor English as it is not my first language.


This is a smart blog. I really do. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. You have a design here that is not too flashy, but makes a statement as big as what you say. Great job, in fact.


Aw, this was a post that was really good. In theory I d like to write like this too taking time and real effort to make a good article . but what can I say . I procrastinate a lot and never seem to get something done that.


I can see that you put a lot of effort into your blog. Keep posting the good work. Some really helpful information in there. Bookmark. Nice to see your site. Thank you!


Great stuff from you, man. Ive read your stuff before and youre too magnificent. I love what you ve got here, love what you say and how you say it. You make it entertaining and you still can stay smart. I can not wait to read more from you. This is really a great blog.


Not? T better written. Reading this post reminds me of my old room mate! He was always talking about it. I will forward this article to him. Pretty sure he will have a good read. Thank you for sharing!


Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that the most useful.


I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that the most useful


Great post! I m just starting out in the media community management marketing and trying to learn how to do it well resources like this article useful. As our company is based in the U. S. , it? S all a bit new to us. The example above is something that I worry about as well, how to show your own enthusiasm and share the fact that your product is useful in this regard


Hrmm that s weird, my comment got eaten. Still I would say that it is great to know that someone else also mentioned this as I have trouble finding the same information elsewhere. This was the first place that told me the answer. Thank you.


Hey, just looking around some blogs, seems a pretty good platform you are using. I m currently using WordPress for some of my sites but looking to change one of them to a platform similar to yours as a trial. Anything in particular you would recommend about it?


You can not intended to do so, but I think you have managed to express the state of mind that a lot of people entering Taste want to help, but not knowing how or where, is something a lot us are going through.


This article gives the light in which we can observe the reality. This is very nice one and gives in depth information. Thank you for this beautiful article


Keep em coming . you all do a great job at such concepts . can not tell you how much I, for one appreciate all you do!


Thank you for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind taking updating your blog with more information? It is extremely useful for me.


Hi webmaster, commentators and more! Blog is absolutely fantastic! Lots of great information and inspiration, both of which we all need! B Keep em coming . you all do a great job at such concepts . can not tell you how much I, for one appreciate all you do!


Have you ever considered adding videos to your blog posts to keep the more entertained the audience? I mean, I just read your entire article and it was quite good but since I m more of a visual learner, I found that to be more useful well let me know how it turns out! I love what you guys are always up too. The clever work and reporting! Keep up the great work man I added you guys to my blogroll. This is a great article thanks for sharing this informative information . . I will regularly visit your blog for some latest post.


Pretty good post. I just stumbled upon your blog and wanted to say that I ve really enjoyed reading your blog posts. Any way I will be subscribing to your feed and I hope you post again soon.


That fantabulous post this has been. Somehow seeing this kind associated with useful post. I am grateful to you and expect much more associated with posts such as. Much obliged.


Thank you so much for writing all of the excellent information! Looking forward to checking out more posts!


Wow, this is a post that is really good quality. In my theory, AOD want to write like this also, AI took the time and effort to make a real good post. but what can I say. I procrastinate a lot and never appear to get something done.


I admit, I ve never been to the webpage in a long time. however it was another pleasure to see that this is an important topic and ignored by so many, even professionals. I thank you for helping to make it aware of possible issueExcellent things as typical people.


This post is quite interesting. I really never thought I could have a good read by this time until I found this site. I thank you for writing given. your information is also very nice. Thank you for the great post. From tons of comments on your articles, I guess I m not the only one having all the enjoyment here! continues to work well.


Interesting topic for a blog. I searched the Internet for fun and came on your website. Unusual items. Thanks a ton for sharing your knowledge! It is very nice to see that some people still put effort into managing their websites. I am sure


Just what I needed. Thankyou I ve been looking for this sort of information for ever. I made a note of your blog so I can read more on the subject.


I am really satisfied with this posting that you have given us. It is truly an amazing feat made you. Thank you and looking for more posts


I love your blog, i have it in my rss reader and always like new things coming out of this


Most powerful, I just given this to a colleague who was doing a little study on this. And he actually bought me breakfast as a result of I found it for him . . smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love learning more about this topic. If achievable, as you turn into expertise, would you mind taking updating your weblog with more information? This, AOS is very useful for me. Big thumbs up for this blog put up!


In fact, I learned about all of this, but with that in mind, I still think it is useful. Good work!


With the whole thing that seems to thrive in the subjects, all your perspectives are usually quite refreshing. Even so, I apologize, but I can not subscribe to the whole plan, all be it exhilarating nonetheless. It seems everyone that your opinions are not entirely justified and, in fact, usually do not really trust fully the argument. Anyway thank examined.


I see you put a lot of work on this site! Keep writing!


Although I am not a noob in the website industry, your site is really unique and has some useful ideas. Enjoy to the fullest! I, ll put in my blogroll, I will give more value to my visitors.


An interesting dialogue is worth comment. I think you should write extra on this matter, won, Aot be a taboo subject but generally people are not enough to talk about this issue. To the next. Applause


I was impressed with the quality of information on this site. There are many great resources here. I am sure I will visit this place soon.


It is a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a quality resource for free. I really loved reading your post. Thank you!


Super blog post, I count on updates by you.


I was very encouraged to find this site. I want to thank you for this special read. I definitely enjoyed every bit of it and I ve marked you to check out new stuff you write.


Finally, a topic that fascinates me. That I am looking for information of this caliber for several hours. Your site is greatly appreciated.


Thank you for another essential article. Where else can you get this kind of information in such a complete way to write? I have a presentation next week, and I am in search of such information.


The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and skin the site in such a way that with very little effort is how I see it makes this site tick all without limiting content and effectiveness.


This is the perfect blog for anyone who wants to know about this topic. You know so much it s almost difficult to argue with you (not that I really want . haha). You definitely put a new spin on a topic that has been written over the years. Great stuff, just great!


This is a smart blog. I m serious. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. You have a design here that is not too flashy, but makes up for what you say statement. Great job, in fact.


Simple, beautiful what you have done here. It is pleasing to look you express from the center and your clarity on this important content can be easily searched. As incredible and welcome your future updates.


Ah, this is a great message. In theory I d like to write like this too taking time and real effort to make a good article . but what can I say . I procrastinate a lot and never do anything.


“%KW%”


Leave a Comment