Skip to content

Commit

Permalink
Prepare node-Tor tunnelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayms committed Aug 2, 2012
1 parent 3d31b38 commit e71a9ca
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 40 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ or
npm link . npm link .


Complementary modules : Complementary modules :
[Ayms/node-Tor](https://github.com/Ayms/node-Tor)
[Ayms/node-cookies](https://github.com/Ayms/node-cookies) [Ayms/node-cookies](https://github.com/Ayms/node-cookies)
[driverdan/node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest) [driverdan/node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest)
[rsms/node-imagemagick](https://github.com/rsms/node-imagemagick) [rsms/node-imagemagick](https://github.com/rsms/node-imagemagick)
Expand Down Expand Up @@ -274,7 +275,11 @@ Scripts that fail will be re-executed after a certain delay, see comments in the
Same happens for links. 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. 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 : ## Tests :


See test/tests.txt See test/tests.txt
Expand Down
4 changes: 2 additions & 2 deletions lib/dom.js
Original file line number Original file line Diff line number Diff line change
@@ -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'), var URL = require('url'),
Expand Down Expand Up @@ -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 Object.defineProperty(window, 'onload', {get : function() {}, set : onl}); //define here - setters and getters destroyed by context


//See "bug" #1770 bnoordhuis answer //See "bug" #1770 bnoordhuis answer

window.setTimeout = setTimeout; window.setTimeout = setTimeout;


vm.runInContext(' \ vm.runInContext(' \
Expand Down
2 changes: 1 addition & 1 deletion lib/ew/ew.js
Original file line number Original file line Diff line number Diff line change
@@ -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, var parser=exports.parser=require('../browser/htmltodom.js').parser,
Expand Down
5 changes: 4 additions & 1 deletion lib/language/javascript.js
Original file line number Original file line Diff line number Diff line change
@@ -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'); var vm = require('vm');


exports.javascript = function(element, code, filename) { exports.javascript = function(element, code, filename) {
try { try {

//console.log('script ------------------'+(element._href||'timeout or onload or eval')+' '+code.substr(0,100));

return vm.createScript(code, filename).runInContext(element._document._parentNode); return vm.createScript(code, filename).runInContext(element._document._parentNode);


} catch(ee) { } catch(ee) {
Expand Down
70 changes: 35 additions & 35 deletions package.json
100644 → 100755
Original file line number Original file line Diff line number Diff line change
@@ -1,36 +1,36 @@
{ {
"name": "node-dom", "name": "node-dom",
"description": "Attempt for javascript fast DOM implementation from a web page, internally not compliant to w3c (performances), externally compliant", "description": "Attempt for javascript fast DOM implementation from a web page, internally not compliant to w3c (performances), externally compliant",
"version": "0.1.0", "version": "0.1.0",
"homepage": "http://www.infonais.fr", "homepage": "http://www.jcore.fr",
"keywords": [ "keywords": [
"dom", "dom",
"html", "html",
"js", "js",
"style", "style",
"css", "css",
"w3c", "w3c",
"javascript", "javascript",
"ajax" "ajax"
], ],
"maintainers": [ "maintainers": [
{ {
"name": "Aymeric Vitte" "name": "Aymeric Vitte"
} }
], ],
"contributors": [ "contributors": [
], ],
"repository": { "repository": {
"url": "" "url": ""
}, },
"licenses": [ "licenses": [
{ {
"type": "MIT" "type": "MIT"
} }
], ],
"author": "Aymeric Vitte <aymeric2@infonais.fr> (http://www.infonais.fr)", "author": "Aymeric Vitte <avitte@jcore.fr> (http://www.jcore.fr)",
"main": "./lib/dom.js", "main": "./lib/dom.js",
"engines": { "engines": {
"node": "*" "node": "*"
} }
} }

0 comments on commit e71a9ca

Please sign in to comment.