Open d33tah opened 7 years ago
+1 for perhaps small/medium size preview/reminder - but as option.
Any specific reason why u stopped using that other ext? Me myself trying to find most lightweight suspender with good feature set. Neomy's seems like the one.
Currently, there is no official way to make screenshot directly from the page, except the page inside an IFrame.
However, there is an interesting way of generating a screenshot using canvas; looks very promising, except that I'm not sure the limitations can be overcome at the extension level.
Currently, there is no official way to make screenshot directly from the page
Oh, but there is! I've used it for another extension to take screenshots of a page. There is a example of it working here: https://github.com/VictorBjelkholm/ipfs-screenshoter/blob/d3f0da4e8053dfc6e88d71a35871ac153e63a5ab/background.js#L30-L64
Huh, that did slip through my hand; was searching MDN with the term 'screenshot' only. XD
I've been trying to implement this and thinking about how to 'store' the screenshot image; for now, I can think of two ways:
data:
URL and supply to the suspend page, orAnd here are the pros & cons of either case:
data:
approach:
storage.local
approach
unlimitedStorage
is required and might anger quite a number of users.Any opinion on this?
@hyunh90 storage.local
approach sounds good, and I don't think you have to request the unlimitedStorage
permission just yet.
Firefox enables you to ask for the "unlimitedStorage" permission from version 56 onwards. It does not yet restrict the amount of data your extension can store, but will start doing so in a future release: so it's a good idea to ask for the "unlimitedStorage" permission now, if you intend to store a large amount of data.
Chrome is currently limiting the storage to 5MB, and I don't think even that limit would be hit, since as soon as the page is loaded again, you can clear the screenshot data.
Guess it would be good to do a quick measurement and see how many tabs you can screenshot and save to the storage, before hitting Chrome's limit (Firefox probably end up with about the same I'm guessing)
Yes, I also thought that to minimize the footprint of the suspend page the extension should drop the image data to somewhere whenever the tab loses focus and reprint when it gains focus; for this, storage.local
is the only applicable, I guess.
I will try to implement with storage.local
.
I mean, the user might be notified that storage.local is only for storing screenshot, might have privacy implications but fewer usability problems. If user says no but still enables the feature, then data:
(and perhaps a suggestion to reconsider the choice) sounds like a solution. The con is that this is most complicated, but probably has best UX.
Hi!
I recently switched from Chromium where I used "The Great Suspender". It had this feature that when a tab got suspended, it was replaced with a screenshot that one could read. Is there a chance you would add such feature?