Provide WebExtension Thumbnail API

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Frontend
P3
enhancement
a year ago
21 days ago

People

(Reporter: sblask, Unassigned)

Tracking

(Blocks: 2 bugs)

44 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160125133541
(Reporter)

Comment 1

a year ago
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

Updated

a year ago
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]
Is this covered by chrome.tabs.captureVisibleTab() ?
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/Tabs/captureVisibleTab
(Reporter)

Comment 3

a year ago
No, because any tab should be capturable, not just the currently visible one.

Updated

a year ago
Whiteboard: [tabs] → [tabs][design decision needed] triaged
Duplicate of this bug: 1272906
Duplicate of this bug: 1272906
Duplicate of this bug: 1272906

Comment 7

8 months ago
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

Updated

4 months ago
Blocks: 1311472
Blocks: 1339561

Comment 8

3 months ago
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
(Reporter)

Comment 9

21 days ago
(In reply to matthias koplenig from comment #8)

A favicon is not the same as a thumbnail...
You need to log in before you can comment on or make changes to this bug.