Created
December 13, 2011 22:31
-
-
Save fzzzy/1474224 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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