diff --git a/headless_client.coffee b/headless_client.coffee index 82f84b067..ca91cc034 100644 --- a/headless_client.coffee +++ b/headless_client.coffee @@ -35,7 +35,7 @@ path = __dirname m = require 'module' request = require 'request' - +Deferred = require "JQDeferred" originalLoader = m._load unhook = () -> @@ -90,6 +90,7 @@ GLOBAL.$ = GLOBAL.jQuery = (input) -> append: (input)-> exports: ()-> cookies = request.jar() +$.when = Deferred.when $.ajax = (options) -> responded = false diff --git a/package.json b/package.json index cbe0addb3..59bfdb9e9 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "graceful-fs": "~2.0.1", "node-force-domain": "~0.1.0", "mailchimp-api": "2.0.x", - "express-useragent": "~0.0.9", + "express-useragent": "~0.0.9", "gridfs-stream": "0.4.x", "stream-buffers": "0.2.x", "sendwithus": "2.0.x", @@ -66,7 +66,8 @@ "webworker-threads": "~0.4.11", "node-gyp": "~0.13.0", "aether": "~0.2.3", - "JASON": "~0.1.3" + "JASON": "~0.1.3", + "JQDeferred": "^2.1.0" }, "devDependencies": { "jade": "0.33.x", @@ -97,7 +98,7 @@ "karma": "~0.10.9", "karma-coverage": "~0.1.4", "compressible": "~1.0.1", - "jasmine-spec-reporter":"~0.3.0" + "jasmine-spec-reporter": "~0.3.0" }, "license": "MIT for the code, and CC-BY for the art and music", "private": true,