Closed
Bug 1208763
Opened 9 years ago
Closed 8 years ago
Treat chrome-extension:// and moz-extension:// schemes as equivalent
Categories
(WebExtensions :: General, defect, P3)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: callahad, Unassigned)
References
Details
(Keywords: DevAdvocacy, Whiteboard: [i18n]triaged[DevRel:P3][design-decision-needed])
The docs for chrome.i18n, https://developer.chrome.com/extensions/i18n, encourage constructing resource URIs by prepending "chrome-extension://" to the value of @@extension_id.
Despite supporting @@extension_id, we only recognize the moz-extension:// scheme. We should tread chrome-extension:// as an alias to moz-extension:// for greater extension compatibility.
For instance, this breaks the Reddit Enhancement Suite: https://github.com/honestbleeps/Reddit-Enhancement-Suite/blob/v4.5.4/Chrome/browsersupport-chrome.js#L116-L117
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Comment 1•9 years ago
|
||
This no longer blocks Bug 1208765, as RES has moved away from this API.
No longer blocks: webext-port-reddit-enhancement-suite
Updated•9 years ago
|
Whiteboard: [i18n]
I think we're going to try to avoid doing this.
Priority: -- → P3
Updated•9 years ago
|
Flags: blocking-webextensions-
Updated•9 years ago
|
Whiteboard: [i18n] → [i18n]triaged
Reporter | ||
Updated•9 years ago
|
Whiteboard: [i18n]triaged → [i18n]triaged[DevRel:P3]
Comment 3•8 years ago
|
||
Wanting to close based on comment 2, no reports of this blocking anyone either. If you disagree callahad please re-open.
Status: NEW → RESOLVED
Closed: 8 years ago
Component: WebExtensions: Untriaged → WebExtensions: General
Flags: blocking-webextensions-
Resolution: --- → WONTFIX
Comment 4•8 years ago
|
||
I'm porting extension from Chrome to WebExtensions API and having several fragments in my css files where I'm using "chrome-extension://" scheme, e.g.
in font-face:
src: url(chrome-extension://__MSG_@@extension_id__/css/fonts/SourceSansPro-Regular.otf) format("opentype");
or for loading images:
background: url('chrome-extension://__MSG_@@extension_id__/img/spinner32.gif') center center no-repeat;
Having that alias would be very handy. Otherwise I need to rewrite all occurences of "chrome-extensions".
Or does it have another workarounds? How am I supposed to load local extension files?
Comment 5•8 years ago
|
||
In this use case is chrome-extension://__MSG_@@extension_id__/ needed? I'm able to set a CSS like:
src: url(Fertigo_PRO.otf) format("opentype");
And it resolves to my local extension and loads the font in both Firefox and Chrome.
Comment 6•8 years ago
|
||
It's true for backgound, popup, options pages, but it's not working in content-scripts.
Comment 7•8 years ago
|
||
Ah thanks, let's re-open then.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Whiteboard: [i18n]triaged[DevRel:P3] → [i18n]triaged[DevRel:P3][design-decision-needed]
Comment 8•8 years ago
|
||
Relative URLs work in all static CSS. Dynamically-generated CSS has other options for creating absolute URLs.
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → WONTFIX
Comment 9•8 years ago
|
||
Ok, it works in Firefox, but doesn't work like this in Chrome. It means that I need to add extra modifications to port my extension into Firefox anyway.
The css rule:
background: url('/img/spinner.gif')
injected by content-script into some page
in Chrome: will be loading from the target page
in Firefox: will be loading from extension resources
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•