#Dime-Webextension
Browser extension (Chrome, Firefox, Vivaldi, Opera, Microsoft Edge, and Safari) to track your digital footprint. Automatically archives the essential data (most frequent keywords, Meta Tags, plain text content and more) of the webpages you visit. Everything is stored in the DiMe server, which you need to installed. It runs locally, and thus your data stays safe on your own computer.
- Archiving browsing history to DiMe server.
- Icons showing DiMe server's status (archived/DiMe is alive/DiMe is disconnected).
- Enable/Disable archiving by one-click.
- Support Chrome, Firefox(48+), Vivaldi Opera, and Microsoft Edge. Limited functions for Safari.
- Install node.js https://nodejs.org/en/.
- Go to the root of the folder;
npm install
to fetch all NPM packages.
- The extension is written in ES2015+ (the next generation Javascript), the Javascript files need to be compiled into ES5 syntax for better compatbility. We chose Babel as the compiler and Webpack as the module bundler.
npm start
activates enviorment.- (optional)
npm start
will run two NPM scripts concurrently. One script is for Webextension(Chrome/Firefox/Opera/Edge)=dev:webextension
. It will watch the source files in./src/webextension
. Another script is for Safari extension(dev:safari
). You couldnpm run dev:webextension
if not foucsing on Safari extension developement. - There will be folders in
./build
such as./build/chrome
and./build/safari
. These folders contain the compiled (from ES2015 to ES5) but unpacked extension. You could load these unpacked extensions in browsers. See below for detailed instructions for Chrome, Firefox and Safari.
- Go to
chrome://extensions/
, enable Developer mode, clickLoad unpacked extension...
, and point the path to./build/webextension
- Edit files in
./src/webextension
, webpack-dev-server will automatcally repack the extension.- If you edit
./src/webextension/background.*.js
or./src/webextension/content.js
, it is necessary to manually 'Reload' the extension.
- If you edit
- To see console messages and errors from
./src/webextension/background.*.js
. Go tochrome://extensions/
, clickInspect views: background page
. - Console messages and errors in
content.js
(the content sciprt) will appear in normal console of browser.
- You should consider using Chrome instead since in Firefox, the Webextension debugging tool is still not ready.
- Enter
about:debugging
in the URL bar. - Click
Load Temporary Add-on
. - Open
./build/webextension/
directory and select any file. - See more details and instructions in MDN
- Currently, it is not possible to load an unpacked extension in Safari. You have to pack it in a folder with the file extension of “safariextension”.
- To do so,
npm run build:safari
, a folder with the file extension of “safariextension” will appear in./dist/safari
. - Open Safari Extension Builder. For instructions, see Apple's documentation.
- In Safari Extension Builder, click
+
andAdd Extension
, load the folder generated in step 2. - Click
Install
.
It is currently necessary to publish a signed extension on the Chrome Web Store. Quoting from the Chrome documentation:
As of Chrome 33, Windows users can only download extensions hosted in the Chrome Web store, except for installs via enterprise policy or developer mode (see Protecting Windows users from malicious extensions). As of Chrome 44, no external installs are allowed from a path to a local .crx on Mac...
- The HIIT distributer has the offical
key.pem
file. If you want to distubute you could generate your own.pem
(see https://developer.chrome.com/extensions/packaging - Place
key.pem
in./src/certs/
. Note that the filename has to bekey.pem
. npm run dist:chrome
, thedime-chrome-extension.zip
will show up in./dist/chrome
.- Upload
dime-chrome-extension.zip
using the Chrome Developer Dashboard. - See more details on Chrome Devloper website.
The extension needs to be signed by Mozilla (But compared to Chrome extension, it is NOT necessary to publish on Mozilla Add-Ons. Quoting from the Firefox documentation:
Starting with Firefox 43 ... Extensions and multipackage installers that support Firefox need to be signed by Mozilla in order for them to be installable in release and beta versions of Firefox. ... Only Mozilla can sign your add-on so that Firefox will install it by default. Add-ons are signed by submitting them to AMO or using the API and passing either an automated or manual code review.
- The HIIT distributer has the offical API key (JWT issuer) and API secret (JWT secret).
- Build and sign the extension by
API_KEY=[your-API-key] API_SECRET=[your-API-secret] npm run dist:firefox
. - A .xpi file should appear in
./dist/firefox
. - See more details on MDN.