Page Monitor
capture webpage and diff the dom change with phantomjs
Effects
Element Add
Element Removed
Text Changed
Style Changed
Make UI to show diffs of history
Usage
First of all, install phantomjs, page-monitor relys on phantomjs to render webpage and genenrate screenshot. DO NOT use
npm
to install phantomjs on winidows, it can't be launched byspawn
.
var Monitor = ; var url = 'http://www.google.com';var monitor = url;monitor;
API
Monitor
var monitor = url options;
see the default options here: https://github.com/fouber/page-monitor/blob/master/index.js , you can override any option for your monitoring.
monitor.capture(callback [, noDiff]);
caputure webpage and save screenshot, then diff with last save.
var monitor = url options;monitor;monitor;monitor;
monitor.diff(left, right, callback);
diff change between left(date.getTime()) and right(date.getTime()).
var monitor = url options;monitor;monitor;monitor;
events
var monitor = url;monitor;monitor;
debug
: debug from phantomnotice
: console from webpageinfo
: info from phantomwarning
: error from webpageerror
: error from phantom