diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-10 15:14:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-10 15:14:38 +0000 |
commit | c761fb01f4d65574e9644fc8815b5dbd2a4c5c5c (patch) | |
tree | 39dc82118c2fe06b5e77c9f0cca2085e1e18808a /misc/drupal.js | |
parent | 879eb7ef3c37bc06bc8dc3e78180bbaedb0a3063 (diff) | |
download | brdo-c761fb01f4d65574e9644fc8815b5dbd2a4c5c5c.tar.gz brdo-c761fb01f4d65574e9644fc8815b5dbd2a4c5c5c.tar.bz2 |
- Patch #673884 by casey, mfer: optimize Drupal.parseJSON.
Diffstat (limited to 'misc/drupal.js')
-rw-r--r-- | misc/drupal.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/misc/drupal.js b/misc/drupal.js index 5b456a65d..d6f7597c3 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -248,18 +248,6 @@ Drupal.theme = function (func) { }; /** - * Parse a JSON response. - * - * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message. - */ -Drupal.parseJson = function (data) { - if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) { - return { status: 0, data: data.length ? data : Drupal.t('Unspecified error') }; - } - return eval('(' + data + ');'); -}; - -/** * Freeze the current body height (as minimum height). Used to prevent * unnecessary upwards scrolling when doing DOM manipulations. */ |