Where can I find the existing Ubiquity commands on my computer?
I am trying to write my own Ubiquity command, and I would like to use the existing commands as a reference (specifically the search commands). However, I can't find the existing commands in a file anywhere on my computer, and a search of the web has turned up nothing. I imagine the answer to this is quite simple, but I haven't been able to find it. I should add that I'm working in Linux right now, but would also like to know where this would be found in Windows.
2
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Since it's a Firefox extension, the files are all bundled into a .xpi file. Xpi files are just .zip files with a different name, so you can unzip it to get at the goodies inside.
However, if you're doing development, a much better approach would be to check out the source code. You'll need to install Mercurial, and then you can check it out from the repository at hg.toolness.com. The command line to check out the repository will be
hg clone http://hg.toolness.com/ubiquity-firefox
The file you want is ubiquity/chrome/content/builtincmds.js.
Do you need more detailed instructions?
I’m confident
1 person says
this answers the question
-
I guess I'm in over my head. I can't find the xpi or js files on my computer. I thought it would be useful to create a search that used highlighted legal cases as a search term on legal database websites. My programming skills are limited though. I'll try installing Mercurial when next I'm in Windows, and give it a crack. Thanks for your assistance! -
Inappropriate?Oh hey, I just realized that there's a much easier way to show people the source code of builtincmds.js. I can just give you this link to the online repository. Duh! No Hg or XPI unzipping required. Go take a look at that and see if it helps at all.
I’m silly
2 people say
this answers the question
-
Hey! That's great! Thanks a lot! -
Inappropriate?You can view your local copy of the javascript files directly in FireFox. Type into the address bar this line:
chrome://ubiquity/content/builtincmds.js
This doesn't allow you to browse the directory though. So you have to know the exact name of the file you want to view.
To find the actual files on your hard disk, if you're on windows, type into Windows Explorer something like this:
%AppData%\Mozilla\Firefox\Profiles\[your profile id]\extensions\ubiquity@labs.mozilla.com\chrome\content
Loading Profile...



