Skip to content

Instantly share code, notes, and snippets.

@fzzzy
Created December 13, 2011 22:31
Show Gist options
  • Save fzzzy/1474224 to your computer and use it in GitHub Desktop.
Save fzzzy/1474224 to your computer and use it in GitHub Desktop.
--- a/node/bin/domrepl.js
+++ b/node/bin/domrepl.js
@@ -79,4 +79,11 @@ function date(){
zeropad(d.getMinutes()), '.',
zeropad(d.getSeconds()),
d.getHours() > 12 ? 'pm':'am' ].join('');
-}
\ No newline at end of file
+}
+
+// parse command line arguments
+
+if (process.argv[2] !== undefined) {
+ vm.runInContext('document._setMutationHandler(function(msg) { stdout([,JSON
+ vm.runInContext('window.location = ' + JSON.stringify(process.argv[2]) + ';
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment