From 77a3017e9edaadb708922fce17b957048096852f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 3 Mar 2011 16:53:16 -0800 Subject: [PATCH] Can now set $config['site']['minify'] = false; to use util.js and friends non-minified; aids in browser-side debugging. --- lib/action.php | 8 +++++++- lib/default.php | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/action.php b/lib/action.php index 9b5f571c61..31e52dfcf2 100644 --- a/lib/action.php +++ b/lib/action.php @@ -295,7 +295,13 @@ class Action extends HTMLOutputter // lawsuit } if (Event::handle('StartShowStatusNetScripts', array($this)) && Event::handle('StartShowLaconicaScripts', array($this))) { - $this->script('util.min.js'); + if (common_config('site', 'minify')) { + $this->script('util.min.js'); + } else { + $this->script('util.js'); + $this->script('xbImportNode.js'); + $this->script('geometa.js'); + } $this->showScriptMessages(); // Frame-busting code to avoid clickjacking attacks. $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }'); diff --git a/lib/default.php b/lib/default.php index 6090217d18..c612557d69 100644 --- a/lib/default.php +++ b/lib/default.php @@ -63,6 +63,7 @@ $default = 'use_x_sendfile' => false, 'notice' => null, // site wide notice text 'build' => 1, // build number, for code-dependent cache + 'minify' => true, // true to use the minified versions of JS files; false to use orig files. Can aid during development ), 'db' => array('database' => 'YOU HAVE TO SET THIS IN config.php', -- 2.39.5