summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-02-19 13:03:26 +0100
committerSarven Capadisli <csarven@status.net>2010-02-19 13:03:26 +0100
commitb03c7a383f00a97b08a270c6c472b46e11314b84 (patch)
treee25511c521dcff6ad43a6ed5e26d8d9f775cb838 /lib/action.php
parent3d665f82d17d36c11bf4f36e84fdeedd911d62c8 (diff)
Only load json2.js if native JSON is not supported
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/action.php b/lib/action.php
index b85f353a3..cd84662c9 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -249,7 +249,7 @@ class Action extends HTMLOutputter // lawsuit
$this->script('jquery.min.js');
$this->script('jquery.form.js');
$this->script('jquery.cookie.js');
- $this->script('json2.js');
+ $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }');
$this->script('jquery.joverlay.min.js');
Event::handle('EndShowJQueryScripts', array($this));
}