Canvasblocker: Introduce support for runtime.onUpdateAvailable

Created on 22 Jan 2021  路  4Comments  路  Source: kkapsner/CanvasBlocker

I would like to propose the implementation of the "runtime.onUpdateAvailable" function for CanvasBlocker, like it was done at uBlock Origin: https://github.com/gorhill/uBlock/commit/59bdf2b4ccd1151a296af36e5536ed00eeb07fb4 (as documented on https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onUpdateAvailable).

Especially the DOMRect spoofing in particular intervenes on practically 99 % of all websites, and reloading the add-on during an active session (as it happens after a successful update check, up until now) has the side effect of breaking (sophisticated) web content, for instance video players, where e.g. losing the current time stamp is especially annoying. I'd propose to let the "onUpdateAvailable" function be optional (similar to how uBlock does it, even though here better suited with a simple checkbox), to let the user decide which behaviour is optimal for their individual use case.

enhancement

All 4 comments

Good point. CB uses https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onSuspend for this exact reason in the hope Firefox will implement this at some point.

I will look into how this could help.

Version 1.6Alpha20210126 has the code. So any versions after that will not update automatically if the boolean is not set (I think I will release a new version tomorrow).

Works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kkapsner picture kkapsner  路  5Comments

concatime picture concatime  路  7Comments

kkapsner picture kkapsner  路  8Comments

hotx picture hotx  路  3Comments

ChromeExtensionsOperator picture ChromeExtensionsOperator  路  3Comments