0

I'm creating a personal home page, due to the fact that iGoogle will be discontinued. One of the things I'm trying to create, is a speed dial-type interface, with website thumbnails as links, and I'd like to automate this process.

I've attempted screenshot automation a few years back with linux and the webkit engine. And it's fine. But my problem is, that I want the screenshots to be from my browser, i.e. my Gmail inbox, not the login page I'd get if attempting a remote screenshot.

I thought of using html2canvas but again, I'd have to load the source of the webpages remotely using a proxy, and that's not what I want. Another attempt of mine, was to load the website in an iframe, extract the source, and pass it on to html2canvas. Unfortunately most websites like google, facebook etc don't allow embeding their websites into iframes, so I'm still stuck.

How do plugins like FoxTab, and SpeedDial make the screenshots from within the browser without popups etc? They do it "browser side" silently, is it possible to duplicate this using just JavaScript? Or is there a way I could accomplish the same in another way, perhaps with a custom addon or something?..

Matt
  • 1,139
  • 1
  • 11
  • 28
  • Similar question here, maybe with answers http://stackoverflow.com/questions/6887183/how-to-take-screen-shot-of-a-div-with-javascript – DannyB May 08 '13 at 09:11
  • @DannyB - the question there, was to create a screenshot from within the same domain. That's easy with html2canvas, but I want to create screenshots from different domains. – Matt May 08 '13 at 09:15

2 Answers2

0

Have you considered using a service like http://webthumbnail.org/ ?

http://phantomjs.org/ is also a great service for that if you want to do it yourself.

0

Take a look at phatomjs. We use it to take screenshots of all our hosted sites periodically. Phantomjs is a headless Webkit implementation.

Max Leske
  • 5,007
  • 6
  • 42
  • 54
  • But using such a plugin, it would fail to accomplish what I want - for the screenshots to be of MY pages. If I'd pass on facebook.com - I'd get a capture of the login page, but not my personal view of facebook.com. I want the thumbnails to be of my view of the pages, just the way SpeedDial or FoxTab display them. – Matt May 08 '13 at 09:18
  • Then I guess you'll have to tap your browser, like those plugins do. It shouldn't be too hard (you could check out how Phatomjs does it, at least for WebKit based browsers the code should look similar). How exactly that will work I have no idea. I've never tampered with plugin coding. – Max Leske May 08 '13 at 12:17