diff --git a/README.md b/README.md index 129e8d88..bef7de5d 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ It profits from these great projects: * updates jQuery.mousewheel to 3.1.3 * updates Moment.js to 2.1.0 * updates markdown-js to 0.4.0-9c21acdf08 +* updates json2.js to 2013-05-26 * adds `uk` translation by Viktor Matveenko * updates to `pl` translation by Mark diff --git a/src/_h5ai/client/js/lib/json2-2011.10.19.js b/src/_h5ai/client/js/lib/json2-2013-05-26.js similarity index 99% rename from src/_h5ai/client/js/lib/json2-2011.10.19.js rename to src/_h5ai/client/js/lib/json2-2013-05-26.js index 3b0c872d..d89ecc7a 100644 --- a/src/_h5ai/client/js/lib/json2-2011.10.19.js +++ b/src/_h5ai/client/js/lib/json2-2013-05-26.js @@ -1,6 +1,6 @@ /* json2.js - 2011-10-19 + 2013-05-26 Public Domain. @@ -159,8 +159,7 @@ // Create a JSON object only if one does not already exist. We create the // methods in a closure to avoid creating global variables. -var JSON; -if (!JSON) { +if (typeof JSON !== 'object') { JSON = {}; } @@ -174,7 +173,7 @@ if (!JSON) { if (typeof Date.prototype.toJSON !== 'function') { - Date.prototype.toJSON = function (key) { + Date.prototype.toJSON = function () { return isFinite(this.valueOf()) ? this.getUTCFullYear() + '-' + @@ -188,7 +187,7 @@ if (!JSON) { String.prototype.toJSON = Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { + Boolean.prototype.toJSON = function () { return this.valueOf(); }; }