2009年10月25日日曜日

Command Line Interface for Chrome

I have been using Mozilla Firefox with Vimperator.
It is not ported to Chrome, therefore I am using ChromeKeyconfig, but it does not support command line operations like "open http://~~~" which are available on Vimperator because this add on focuses only on key configuration.
(I think this should be as-is because key event reassignment and command line interface are quite different functions to be implemented in one add on.)

Then I wrote a simple add on which enables command line operations on Chrome.

Download: Command Line Browser

After install this, please type a colon.
An input field will appear on your screen, and you can execute some actions.
Only 2 actions are implemented so far, "open url" (command "o") and "search with google" (command "s").
I'd like to append other functions afterward, and if you'd like to do it by yourself, you can do it by editing "Command definitions" part of script.js.
The script is so simple that you will be able to edit it easily.
(If you need more detailed information, please tell me.)

Finally, If you know how to manipulate tabs and windows from Chrome extentions, I would appreciate it if you could write it in comments.
I tried to get window size with "chrome.windows.getCurrent" or something like that, but it wouldn't let me touch windows.

Oct 29
Resolved.
Most chrome.* APIs are not accessible from content script.
But we can get window size by window.innerHeight and window.innerWidth.

0 件のコメント:

コメントを投稿