Closed Bug 1554514 Opened 6 years ago Closed 6 years ago

A WebExtension API to inject custom CSS into chrome

Categories

(WebExtensions :: Untriaged, enhancement)

69 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1392589

People

(Reporter: kolan_n, Unassigned)

Details

With userChrome.css is being phased out as a

a relic from the XUL era

a better way to customize browser interface is needed. It is proposed to creart a new API similar to tabs giving access to chrome. This way it would be possible to recreate some functionality of ClassicThemeRestorer by injecting css rules based on settings set via checkboxes rather than commented-out rules in userChrome.css.

Component: General → Untriaged
Product: Firefox → WebExtensions
Version: 69 Branch → Firefox 69

Would this cover a pref replacement for userChrome and userScript?

With userChrome.css is being phased out
where do you know this from?

(In reply to macfan from comment #2)

With userChrome.css is being phased out
where do you know this from?

From the experience with XUL add-ons, I believe.
At first it was "We're just adding WebExtension support, we're not going to remove XUL add-ons"
Then it became "We're not going to remove XUL add-ons support until WebExtension API will cover XUL add-ons functionality"
And finally "We're going to remove them anyway. And we won't add your favorite customization feature into the browser or the webext API, WONTFIX"
And all that hell with add-on signing in the official builds... It all comes from the political decisions, really. But I won't get into that.

Would this cover a pref replacement for userChrome and userScript?

IDK if it will fully cover. What is userScript? I have not found any docs about that file. If it was injected into main chrome of a window and allowed some adding elements and event listeners, I guess the proposed API should cover it too.

With userChrome.css is being phased out

where do you know this from?

https://bugzilla.mozilla.org/show_bug.cgi?id=1541233
Though noone has directly confirmed that the API is phased out, there are some signs that make me feel like that Mozilla desires to get rid of that "legacy".

At first it was "We're just adding WebExtension support, we're not going to remove XUL add-ons"

XPCOM addons are still there. One can create a WebExtension experiment, and from that code one can instantiate XPCOM components. The problem is that they are not allowed to stable builds and into AMO. And that it is hard to persuade Mozilla to include the designed and implemented API into the browser even if it solves a real problem plaguing some extensions. As you have already noted, all of these issues are not technical, but political.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE

Marked as dupe, but it is not quite, this but also suggests to allow injecting not only CSS, but also JS.

(In reply to KOLANICH from comment #6)

Marked as dupe, but it is not quite, this but also suggests to allow injecting not only CSS, but also JS.

There are other bugs that can be duped to but running chrome-privileged JS from webextensions is a hard no.

Version: Firefox 69 → 69 Branch
You need to log in before you can comment on or make changes to this bug.