Chrome Url Extension
Installing
- Obtain the chrome native component (python package). Options:
- from pip
$ pip install chromeurl
- from the source tree
$ cd native $ python setup.py install --user
- from pip
- Install the extension. Options:
- manually from the chrome web store (preferred)
- automatically from the web store (may require root privileges)
$ chromeurl --install-manifest extension
- from local source tree
- navigate to
chrome://extensions/
-
Load Unpacked
the extension directory rooted at./chrome
- note the extension `ID` as UNPACKED_EXTENSION_ID
- navigate to
- Native host manifest (make chrome aware of the native host). Options:
- if extension came from the webstore
$ sudo chromeurl --install-manifest native
- if unpacked locally and loaded from source:
$ sudo chromeurl --install-manifest native --extension-id <UNPACKED_EXTENSION_ID>
- if extension came from the webstore
Get current url
- While chrome is running, make an HTTP request to get the current url
$ curl http://127.0.0.1:19615/tabs/current/url https://developer.chrome.com/extensions/activeTab
Debugging
- start chromium from a terminal to see native host debug messages
- navigate to the extension background from page (chrome://extensions) to see background page log messages
Security
- Any local process may read the user’s current url