Skip to main content

Native messaging host component of chrome current url extension.

Project description

Installation

$ pip3 install chromeurl
$ chromeurl --install-manifest all

Development

  1. Obtain the chrome native component (python package). Options:
    • from the source tree

      $ cd native
      $ python setup.py install --user
      
  2. Install the extension. Options:
    • automatically from the web store

      $ chromeurl --install-manifest extension
      
    • manually from the chrome web store

    • manually from local source tree (for development)

      • navigate to chrome://extensions/
      • Load Unpacked the extension directory rooted at ./chrome
      • note the extension `ID` as UNPACKED_EXTENSION_ID
  3. Install native host manifest (make chrome aware of the native host). Options:
    • if extension came from the webstore

      $ chromeurl --install-manifest native
      
    • if unpacked locally and loaded from source (for development):

      $ chromeurl --install-manifest native --extension-id <UNPACKED_EXTENSION_ID>
      

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
  • By default the browsing history is logged to ~/.browser-history.tsv

Config file

  • Native host behavior can be configured via a config file at any of these locations:

    • /etc/chromeurl.conf
    • ~/.config/chromeurl.conf
  • Example config file:

    port = 1239
    verbose = True
    logfile = /dev/null
    
  • See $chromeurl --help$ for a list of options

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromeurl-2025.12.22.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chromeurl-2025.12.22.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file chromeurl-2025.12.22.0.tar.gz.

File metadata

  • Download URL: chromeurl-2025.12.22.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for chromeurl-2025.12.22.0.tar.gz
Algorithm Hash digest
SHA256 365a725f38aa3e5586d12e1612747956d5b7b4c08736bf09fa20bf07df3b0997
MD5 d737bf149ef5841e5e61a37fd66dd0ae
BLAKE2b-256 756b77306d3d9622ef77f501e5ca18477cccb4eb292bfabaa2825c177de093ef

See more details on using hashes here.

File details

Details for the file chromeurl-2025.12.22.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chromeurl-2025.12.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd5d8b0061beebf726c5d74cc1d40907fad15a35da53a6ca17dbe4ea1b1727d7
MD5 674216249114d91b9f16e66ca1cc1829
BLAKE2b-256 eab43b42074eac89c2c36ec0bd0c2a9feab1d72c3a552c5ddc1f27808d195d01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page