Permalink
Browse files

Prepare node-Tor tunnelling

  • Loading branch information...
1 parent 3d31b38 commit e71a9ca488ee0e5ca41c3bd2314007429bc185d2 @Ayms committed Aug 2, 2012
Showing with 48 additions and 40 deletions.
  1. +6 −1 README.md
  2. +2 −2 lib/dom.js
  3. +1 −1 lib/ew/ew.js
  4. +4 −1 lib/language/javascript.js
  5. +35 −35 package.json
View
@@ -26,6 +26,7 @@ or
npm link .
Complementary modules :
+ [Ayms/node-Tor](https://github.com/Ayms/node-Tor)
[Ayms/node-cookies](https://github.com/Ayms/node-cookies)
[driverdan/node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest)
[rsms/node-imagemagick](https://github.com/rsms/node-imagemagick)
@@ -274,7 +275,11 @@ Scripts that fail will be re-executed after a certain delay, see comments in the
Same happens for links.
Images are loaded asynchronously, same image is loaded just once, then width/height are set to objects related to this image.
-
+
+## Tunnelling with node-Tor :
+
+ TODO
+
## Tests :
See test/tests.txt
View
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2011 Naïs - Aymeric Vitte - MIT license
+Copyright (c) 2011 jCore - Aymeric Vitte - MIT license
*/
var URL = require('url'),
@@ -41,7 +41,7 @@ var dom = exports.dom = function(page,level,options) {
Object.defineProperty(window, 'onload', {get : function() {}, set : onl}); //define here - setters and getters destroyed by context
//See "bug" #1770 bnoordhuis answer
-
+
window.setTimeout = setTimeout;
vm.runInContext(' \
View
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2011 Naïs - Aymeric Vitte - MIT license
+Copyright (c) 2011 jCore - Aymeric Vitte - MIT license
*/
var parser=exports.parser=require('../browser/htmltodom.js').parser,
@@ -1,11 +1,14 @@
/*
-Copyright (c) 2011 Naïs - Aymeric Vitte - MIT license
+Copyright (c) 2011 jCore - Aymeric Vitte - MIT license
*/
var vm = require('vm');
exports.javascript = function(element, code, filename) {
try {
+
+ //console.log('script ------------------'+(element._href||'timeout or onload or eval')+' '+code.substr(0,100));
+
return vm.createScript(code, filename).runInContext(element._document._parentNode);
} catch(ee) {
View
70 package.json 100644 → 100755
@@ -1,36 +1,36 @@
-{
- "name": "node-dom",
- "description": "Attempt for javascript fast DOM implementation from a web page, internally not compliant to w3c (performances), externally compliant",
- "version": "0.1.0",
- "homepage": "http://www.infonais.fr",
- "keywords": [
- "dom",
- "html",
- "js",
- "style",
- "css",
- "w3c",
- "javascript",
- "ajax"
- ],
- "maintainers": [
- {
- "name": "Aymeric Vitte"
- }
- ],
- "contributors": [
- ],
- "repository": {
- "url": ""
- },
- "licenses": [
- {
- "type": "MIT"
- }
- ],
- "author": "Aymeric Vitte <aymeric2@infonais.fr> (http://www.infonais.fr)",
- "main": "./lib/dom.js",
- "engines": {
- "node": "*"
- }
+{
+ "name": "node-dom",
+ "description": "Attempt for javascript fast DOM implementation from a web page, internally not compliant to w3c (performances), externally compliant",
+ "version": "0.1.0",
+ "homepage": "http://www.jcore.fr",
+ "keywords": [
+ "dom",
+ "html",
+ "js",
+ "style",
+ "css",
+ "w3c",
+ "javascript",
+ "ajax"
+ ],
+ "maintainers": [
+ {
+ "name": "Aymeric Vitte"
+ }
+ ],
+ "contributors": [
+ ],
+ "repository": {
+ "url": ""
+ },
+ "licenses": [
+ {
+ "type": "MIT"
+ }
+ ],
+ "author": "Aymeric Vitte <avitte@jcore.fr> (http://www.jcore.fr)",
+ "main": "./lib/dom.js",
+ "engines": {
+ "node": "*"
+ }
}

0 comments on commit e71a9ca

Please sign in to comment.