aw-watcher-web

A cross-browser WebExtension that serves as a web browser watcher for ActivityWatch.
It enables detailed browser tracking by recording the active tab’s title, URL,
audible state, and incognito state. Without it, ActivityWatch can usually only
see the browser window title from desktop window watchers.
On Chromium browsers, grouped tabs also include optional tab_group (the group
name, including an empty name) and tab_group_color fields. This uses the
tabGroups permission. Ungrouped tabs and browsers without that API omit both
fields. Group names and colors are sampled with each heartbeat, so renaming a
group appears by the next normal heartbeat; moving a tab between groups also
triggers an update. As with tab titles and URLs, group names may contain sensitive
information and are recorded in your local ActivityWatch data. These fields capture
context only: they do not automatically create categories or task reports.
Learn more: Watchers • Architecture •
Buckets and events
Installation
Official Releases
Install from official stores:
Development Build
Download the latest development build from our GitHub Actions:
- Click on the latest successful workflow run
- Scroll down to “Artifacts”
- Download either
firefox.zip or chrome.zip
- GitHub login is required to download artifacts
- These builds are unsigned and require developer mode/settings
Firefox Enterprise Policy
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
- Clone the repository with submodules:
git clone --recurse-submodules https://github.com/ActivityWatch/aw-watcher-web.git
cd aw-watcher-web
- Install dependencies:
make install
- 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
- First follow the steps above to build the extension:
make install
make build-safari
- Convert the extension to Safari format:
xcrun safari-web-extension-converter ./build
after finished, xcode will open automatically.
- In Xcode:
- Select build target of macOS
- Build the project (⌘B)
- Run the extension (⌘R)
- Enable the extension in Safari:
- Open Safari
- Go to Safari > Settings > Extensions
- Enable “aw-watcher-web”
- 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
- Extract
artifacts/chrome.zip to a folder
- Go to
chrome://extensions
- Enable “Developer mode”
- Click “Load unpacked” and select the extracted folder
Firefox
- Go to
about:addons
- Click the gear icon (⚙️) and select “Install Add-on From File…”
- 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.
评论