Open Bug 1246693 Opened 9 years ago Updated 2 years ago

Provide WebExtension Thumbnail API

Categories

(WebExtensions :: Frontend, enhancement, P3)

44 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: blask, Unassigned)

References

(Blocks 2 open bugs)

Details

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

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Build ID: 20160125133541
I've got an extension: https://addons.mozilla.org/en-US/firefox/addon/bookmark-dial/ (and there are several others) that generate thumbnails. I know there is a service today that does it, but it won't be accessible from WebExtensions. It would be great if there would be a WebExtension API that I can call with a URL and that generates a thumbnail and returns a URL to it. Ideally there would be a way to modify the CSS for it (this is how I do it now: https://github.com/sblask/firefox-bookmark-dial/blob/master/lib/thumbnail.js#L89 / https://github.com/sblask/firefox-bookmark-dial/blob/master/data/thumbnail_tab_content_script.js) Alternatively, there could be streamlined version of what I do today: open a tab, hide it, apply style and capture it. What would be missing is hiding a tab (this is what I do today: https://github.com/sblask/firefox-bookmark-dial/blob/master/lib/thumbnail.js#L30 (collapsed + disabled)) and capturing any tab(not just the currently visible one) to allow for background generation.
Component: Untriaged → Webapp Runtime
Component: Webapp Runtime → Untriaged
Severity: normal → enhancement
Component: Untriaged → WebExtensions
Product: Firefox → Toolkit
Whiteboard: [tabs][berlin]
Whiteboard: [tabs][berlin] → [tabs][berlin][good first bug]
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [tabs][berlin][good first bug] → [tabs]
No, because any tab should be capturable, not just the currently visible one.
Whiteboard: [tabs] → [tabs][design decision needed] triaged
This seems like a good idea, we haven't talked about it much because the whiteboard tag was wrong, but I can't imagine this being that controversial and I don't think there's anything that does this already. As a minor point I'm commenting on this bug using VerticalTabs which is showing a thumbnail of the window in the tab...
Component: WebExtensions: Untriaged → WebExtensions: Frontend
Priority: -- → P3
Whiteboard: [tabs][design decision needed] triaged → [tabs][design-decision-approved] triaged
Blocks: 1311472
looking at this sample-code from developer.chrome.com there is an api in chrome to get the thumbnail. [1] "permissions": [ "topSites", "chrome://favicon/" ], -- [2] eightBallWindow.style.backgroundImage = 'url(chrome://favicon/' + data[rand].url + ')'; [1] https://developer.chrome.com/extensions/examples/api/topsites/magic8ball/manifest.json [2] https://developer.chrome.com/extensions/examples/api/topsites/magic8ball/newTab.js
(In reply to matthias koplenig from comment #8) A favicon is not the same as a thumbnail...
Blocks: 1232178
Product: Toolkit → WebExtensions

Any news on this?

I agree with this request. Why it is not available for the developer but it available for the Firefox itself? We need a thumb property for the topSite object.

I would imagine there may be security concerns in terms of how the resulting images would be used. A use case might be someone with a tab containing bank account or other sensistive information. Not saying FF is leaky about that, but just that it would probably be a concern on the user side.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.