]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use non-minified jQuery when $config['site']['minify'] is off; aids in debugging...
authorBrion Vibber <brion@pobox.com>
Fri, 11 Mar 2011 22:48:47 +0000 (14:48 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 11 Mar 2011 22:48:47 +0000 (14:48 -0800)
lib/action.php

index b1f16f5f16842442a0f09b2d7ba1dcb7a34aa658..233ac7856788e05dd36dc668e319e57fa85cc0a1 100644 (file)
@@ -293,11 +293,19 @@ class Action extends HTMLOutputter // lawsuit
     {
         if (Event::handle('StartShowScripts', array($this))) {
             if (Event::handle('StartShowJQueryScripts', array($this))) {
-                $this->script('jquery.min.js');
-                $this->script('jquery.form.min.js');
-                $this->script('jquery.cookie.min.js');
-                $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js').'"); }');
-                $this->script('jquery.joverlay.min.js');
+                if (common_config('site', 'minify')) {
+                    $this->script('jquery.min.js');
+                    $this->script('jquery.form.min.js');
+                    $this->script('jquery.cookie.min.js');
+                    $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js').'"); }');
+                    $this->script('jquery.joverlay.min.js');
+                } else {
+                    $this->script('jquery.js');
+                    $this->script('jquery.form.js');
+                    $this->script('jquery.cookie.js');
+                    $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }');
+                    $this->script('jquery.joverlay.js');
+                }
                 Event::handle('EndShowJQueryScripts', array($this));
             }
             if (Event::handle('StartShowStatusNetScripts', array($this)) &&