tosdr / browser-extensions

Browser extensions for Terms of Service; Didn't Read. “I have read and agree to the Terms” is the biggest lie on the web. We aim to fix that. Get informed instantly about websites' terms & privacy policies, with ratings and summaries from the www.tosdr.org initiative.
http://tosdr.org/downloads
GNU Affero General Public License v3.0
400 stars 45 forks source link

Use webextension-polyfill #33

Closed oslego closed 3 years ago

oslego commented 5 years ago

Web extensions use the browser namespace which has a very similar API naming to the chrome namespace used in Chrome, but with a Promise-based API instead of the callback-based one.

To provide an inter-operable web extension source for both Firefox and Chrome, the code in this repository currently uses a minimal manual mapping between chrome and browser namespaces for the few methods used here.

Consider using the https://github.com/mozilla/webextension-polyfill to replace this manual mapping and ensure uniform support of the Promise-based browser API for web extensions across browsers. While not explicitly supported, Opera and the Chromium-based Edge browsers should work out of the box in most scenarios.