This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| var page = new WebPage(), | |
| address, output, size; | |
| //capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs | |
| capture = function(targetFile, clipRect) { | |
| var previousClipRect; | |
| var clipRect = {top: 0, left:0, width: 40, height: 40}; | |
| if (clipRect) { | |
| if (!isType(clipRect, "object")) { | |
| throw new Error("clipRect must be an Object instance."); |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer