Eyes Above The Waves

Robert O'Callahan. Christian. Repatriate Kiwi. Hacker.

Thursday 21 June 2007

Webstock Press

Peter Griffin at the NZ Herald has blogged about my Webstock presentation. It's pretty good although it doesn't capture the smile on my face when I commented about Safari market share.

Comments

dev
Hey,
I needed a way to save up the image (thumbnail say) of a webpage to base64 data , purely with javascript. I know the code works from client side as say an extension etc i.e with chrome privileges.... but my question is .. what If I sign my script? then do I get the privileges necessary to do the imaging after adding
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
in the script?
Also I want to get the image of the whole page (or maybe part of the page, but definitely more than the viewing area visible to the user). Is this possible using the element?
This question is specific to doing it without any extensions on the client ....
If I decide to use an extension, I will have a whole different set of questions :).
I posted here cos the orignal thread where you introduced this stuff seems to be closed for comments.
Robert O'Callahan
> what If I sign my script?
Then you will be able to call drawWindow, yes.
> Is this possible using the element?
Yes.
dev
Hey,
Thanks a lot.
Well I am trying to do it and it seems to work for areas a little larger than the size of the viewing area. But it seems to have stuck up on a max height / length and does not seem to go beyond that height even if I keep everything else the same and just do a +300 on the height/width part of draw window. To put it a little more clearly ..
ctx.clearRect(offsetLeft, offsetTop, offsetWidth , offsetHeight);
ctx.drawWindow(window, offsetLeft, offsetTop, offsetWidth , offsetHeight , "rgb(0, 0 ,0)");
gives me an incomplete (cut at bottom) image of what I want , but even if I replace it with offsetWidth + 300, offsetHeight+300 (in both lines) I don't get ANY difference in the image ...
I know this is probably not the place to ask this, I thought I will take a chance :) . Sorry about something nearly akin to spam in your comments thread ...