Tag Archives: firefox

Running Ubiquity on Google Chrome

It's been a while since I started working on Ubiquity for Opera. It's my limited, but for me totally awesome, port of Mozilla's Ubiquity project, originally only for Firefox, to the Opera browser.

I had several people ask me through my blog or email to write a version for Google Chrome. And, by popular demand, here it is! To my surprise, it took much less than I had originally thought. I had a few small problems though, from the event handlers, different from Opera UserJS model, to style attributes for dynamically created elements, and other minor things as well.

It's still lacking Ajax/xmlHttpRequest support, but that shouldn't be a huge problem.

I uploaded it to userscripts.org too. You can see it here: http://userscripts.org/scripts/show/85550.

The code, as usual, is up on Github

http://github.com/cosimo/ubiquity-chrome/.

If you try it, I would be interested to know what you think. Have fun!

And finally, Ubiquity for Opera v2.0!

Yes, I'm still working on this. It's so cool… :-)

This version, named 2.0, is a partial rewrite that allows most native Firefox Ubiquity commands to run unaltered. If you like Ubiquity, check out the UserJS forum announcement, or read the help page (with screenshot).

Download Ubiquity.js v2.0 and if you have suggestions for new commands, tell me!

Yet another post about Ubiquity

Yeah, sorry, but it's so exciting… :-)

In my development version now I'm able to run unmodified Firefox Ubiquity commands!
Yes, original Firefox Ubiquity JS commands can be run in the Opera version.

That's great! Of course, not all of them can work. Most of the Ubiquity internal objects are mocked, but nonetheless they work. So now I'm going to rewrite the command list as they were pB]native[/B] ubiquity commands and adapt all the code to this new structure.
This is an example of a native Ubiquity command:


CmdUtils.CreateCommand({
  name: "validate",
  icon: "http://www.imageboo.com/files/uhee2ii315oxd8akq0nm.ico",
  description: "Checks the markup validity of the current Web document",
  preview: "Sends this page to the W3C validator",
  execute: function() {
    var url = "http://validator.w3.org/check?uri=" + Application.activeWindow.activeTab.document.location.href;
    Utils.openUrlInBrowser( url );
  }
})

Cool!

Ubiquity for Opera 1.0 released!

The "nightly experiment" now is something more. Actually I am very surprised to see the amount of stuff I could do with "just" user javascript. It's already beyond my initial thoughts.

So now the plan is to convert it to a widget and get the full widget power, XHR, notifications, sticky preferences, and all that. Then, to complete the Opera version, I would only need to load real Ubiquity command RSS feeds. But that's probably not going to happen anytime soon…

Download Ubiquity for Opera v1.0

The usual warning about the default ubiquity shortcut, CTRL + SPACE, which is used by default in Opera as "homepage" shortcut. You have to remove it, or modify the javascript to assign it another shortcut.

Enjoy!

Ubiquity for Opera


I think Ubiquity is a pretty cool project, probably a bit overrated, but …
I thought it would be nice to try to build something like that for Opera, and learning UserJS along the way.

I managed to get the basics working. Right now, there's only one command, tran-no which takes you to the Google Translate page from Norwegian to English. If you have selected some text before bringing up "Ubiquity" (CTRL + SPACE), then typing tran-no + ENTER will translate that text for you.

Now I was trying to make it replace the text inline inside the page, instead of popping up a new tab with the Google Translate window. It seems that is somewhat harder, especially because the text you select might be broken up in several pieces, like:


This might be <b>your text</b>, so how do you   replace it?

Here it is: ubiquity.js