Closed Bug 1391912 Opened 7 years ago Closed 7 years ago

Allow adding a background image to about:newtab and about:home without using chrome_url_overrides

Categories

(WebExtensions :: Frontend, defect, P5)

54 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1347204

People

(Reporter: geoffreydebelie, Unassigned)

Details

(Whiteboard: [design-decision-approved][themes][triaged])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20170813183258 Steps to reproduce: The idea is the following: you want to write a WebExtension that adds a background to the about:newtab and about:home pages. Currently, since there are security imposed on about: pages, you cannot do this without overriding the about:newtab (and about:home) page using https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/chrome_url_overrides. You also cannot do this using the tabs API method insertCSS, because there are security restrictions on that API as well, I quote: "You can only inject CSS into pages whose URL can be expressed using a match pattern: meaning, its scheme must be one of "http", "https", "file", "ftp". This means that you can't inject CSS into any of the browser's built-in pages, such as about:debugging, about:addons, or the page that opens when you open a new empty tab." https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/insertCSS I would like an API that takes a background image in the form of an URL and applies this to the "background" CSS property of those pages. Maybe this fits in the tabs API? browser.tabs.setBackground(optionalTabId, {backgroundUrl: "https://somewhere/image.png"}); browser.tabs.setBackground(optionalTabId, {backgroundUrl: "/relative-to-webextension-root/images/image.png"});
Summary: WebExtensions: allow adding a background page to about:newtab and about:home without using chrome_url_overrides → Allow adding a background page to about:newtab and about:home without using chrome_url_overrides
Whiteboard: [design-decision-needed]
Hi Geoffrey, this has been added to the agenda for the September 5 WebExtensions APIs triage. Will you be able to join us? Wiki: https://wiki.mozilla.org/Add-ons/Contribute/Triage#Next_Meeting Agenda: https://docs.google.com/document/d/13gmYyN0qCjzV7YAsqGpbeeHr3al0yiWP7ayqKJPLS2w/edit#
A better
Summary: Allow adding a background page to about:newtab and about:home without using chrome_url_overrides → Allow adding a background image to about:newtab and about:home without using chrome_url_overrides
Flags: needinfo?(amckay)
I think rather than put this in the tabs API, this would make more sense in the themeing API. Adding to the general theming tracker which is bug 1330328.
Blocks: themingapi
Component: WebExtensions: Untriaged → WebExtensions: Frontend
Flags: needinfo?(amckay)
Priority: -- → P5
Whiteboard: [design-decision-needed] → [design-decision-approved][themes][triaged]
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
No longer blocks: themingapi
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.