<commit_before>var sys = require("sys"), 
    dom = require(__dirname +"/../../lib/level1/core").dom.level1.core,
    fs = require("fs");
    
var window = global.window = require(__dirname + "/../../lib/browser").windowAugmentation(dom);
var document = global.document = global.window.document;
var location = global.location = global.window.location;
var window = global;
var navigator = global.navigator = { userAgent: "node-js" };

fs.readFile(__dirname + "/jquery.js", function(err, data) {

  global.window.document.compareDocumentPosition = function() {};
  dom.Node.prototype.addEventListener = window.addEventListener = window.document.addEventListener = function() {};

  try {
    eval(data);
  } catch (e) {
    sys.puts(sys.inspect(e.stack, true));
  }

  // Doing this requires you setup a parser, easiest way is to put node-htmlparser.js into 
  // ~/.node_libraries/
  jQuery(document.body).append("<div class='testing'>Hello World, It works!</div>");
  sys.puts(jQuery(".testing").text());
 
})
<commit_msg>fixed jquery example<commit_after>var sys = require("sys"), 
    dom = require(__dirname +"/../../lib/level1/core").dom.level1.core,
    fs = require("fs");

    
var window = require(__dirname + "/../../lib/browser").windowAugmentation(dom);
var document = window.document = window.document;
var location = window.location = window.location;
var navigator = window.navigator = { userAgent: "node-js" };
global.window = window;

fs.readFile(__dirname + "/jquery.js", function(err, data) {
  global.window.document.compareDocumentPosition = function() {};
  dom.Node.prototype.addEventListener = window.addEventListener = window.document.addEventListener = function() {};

  try {
    eval(data.toString());
  } catch (e) {
    sys.puts(sys.inspect(e.stack, true));
  }

  // Doing this requires you setup a parser, easiest way is to put node-htmlparser.js into 
  // ~/.node_libraries/

  window.jQuery(document.body).append("<div class='testing'>Hello World, It works!</div>");
  sys.puts(window.jQuery(".testing").text());
});
{'fraction_non_alphanumeric': 0.17202729044834308, 'fraction_numerical': 0.001949317738791423, 'mean_word_length': 4.069135802469136, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5134237', 'n_tokens_mistral': 619, 'n_tokens_neox': 599, 'n_words': 132}