Skip to content

haroon7v/aw-watcher-web

 
 

Repository files navigation

aw-watcher-web

Chrome Web Store Mozilla Add-on

A cross-browser WebExtension that serves as a web browser watcher for ActivityWatch.

Installation

Official Releases

Install from official stores:

Development Build

Download the latest development build from our GitHub Actions:

  1. Click on the latest successful workflow run
  2. Scroll down to "Artifacts"
  3. Download either firefox.zip or chrome.zip

Note

  • GitHub login is required to download artifacts
  • These builds are unsigned and require developer mode/settings

Firefox Enterprise Policy

Note

Due to Mozilla Add-on Policy, this is not possible with the Mozilla-hosted versions of the extension. You will need to fork the extension and change a hardcoded value to make this work.

Due to the above issue, a privacy notice must be displayed to comply with the Mozilla Add-on Policy. This can be pre-accepted by setting the following Firefox Enterprise Policy (More about Firefox Policies):

{
    "policies": {
        "3rdparty": {
            "Extensions": {
                "{ef87d84c-2127-493f-b952-5b4e744245bc}": {
                    "consentOfflineDataCollection": true
                }
            }
        }
    }
}

Building from Source

Prerequisites

  • Node.js (23 or higher)
  • Git
  • Make

Build Steps

  1. Clone the repository with submodules:
git clone --recurse-submodules https://github.com/ActivityWatch/aw-watcher-web.git
cd aw-watcher-web
  1. Install dependencies:
make install
  1. Build the extension:
# For Firefox:
make build-firefox

# For Chrome:
make build-chrome

This will create zip files in the artifacts directory:

  • artifacts/firefox.zip for Firefox
  • artifacts/chrome.zip for Chrome

if you want to build safari version

  1. First follow the steps above to build the extension:
make install
make build-safari
  1. Convert the extension to Safari format:
xcrun safari-web-extension-converter ./build

after finished, xcode will open automatically.

  1. In Xcode:
  • Select build target of macOS
  • Build the project (⌘B)
  • Run the extension (⌘R)
  1. Enable the extension in Safari:
    • Open Safari
    • Go to Safari > Settings > Extensions
    • Enable "aw-watcher-web"

Note

  • You need Xcode installed to build Safari extensions
  • The extension needs to be signed with your Apple Developer account
  • Safari extensions require macOS 11.0 or later

Installing the Development Build

Chrome

  1. Extract artifacts/chrome.zip to a folder
  2. Go to chrome://extensions
  3. Enable "Developer mode"
  4. Click "Load unpacked" and select the extracted folder

Edge

  1. Build an Edge package:
make build-edge
  1. Extract artifacts/edge.zip to a folder
  2. Go to edge://extensions
  3. Enable "Developer mode"
  4. Click "Load unpacked" and select the extracted folder

Edge Enterprise Policy (managed storage)

Managed storage in Edge requires a Chromium managed schema and enterprise policy deployment:

  • Manifest includes storage.managed_schema via schema.json (handled in this repo).
  • Policy values are applied through Edge policy, not extension local storage.
  • In most environments, unpacked developer-loaded extensions do not receive enterprise policy values. Use policy-installed extension deployment for managed values.

Example Windows registry policy path:

HKLM\Software\Policies\Microsoft\Edge\3rdparty\extensions\<EXTENSION_ID>\policy

Add policy values for keys defined in schema.json (for example CLOUD_SYNC, TAG, SUBDOMAIN, REGION) under that policy key.

Firefox

  1. Go to about:addons
  2. Click the gear icon (⚙️) and select "Install Add-on From File..."
  3. Navigate to and select the artifacts/firefox.zip file

Note

For Firefox, installing unsigned extensions requires Firefox Developer Edition or Nightly. In Firefox Developer Edition, you need to set xpinstall.signatures.required to false in about:config.

About

Browser watcher for ActivityWatch

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 81.7%
  • Makefile 9.4%
  • HTML 7.1%
  • CSS 1.8%