Can now set $config['site']['minify'] = false; to use util.js and friends non-minified; aids in browser-side debugging.

This commit is contained in:
Brion Vibber 2011-03-03 16:53:16 -08:00
parent 488230c3e1
commit 77a3017e9e
2 changed files with 8 additions and 1 deletions

View File

@ -295,7 +295,13 @@ class Action extends HTMLOutputter // lawsuit
} }
if (Event::handle('StartShowStatusNetScripts', array($this)) && if (Event::handle('StartShowStatusNetScripts', array($this)) &&
Event::handle('StartShowLaconicaScripts', array($this))) { Event::handle('StartShowLaconicaScripts', array($this))) {
if (common_config('site', 'minify')) {
$this->script('util.min.js'); $this->script('util.min.js');
} else {
$this->script('util.js');
$this->script('xbImportNode.js');
$this->script('geometa.js');
}
$this->showScriptMessages(); $this->showScriptMessages();
// Frame-busting code to avoid clickjacking attacks. // Frame-busting code to avoid clickjacking attacks.
$this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }'); $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');

View File

@ -63,6 +63,7 @@ $default =
'use_x_sendfile' => false, 'use_x_sendfile' => false,
'notice' => null, // site wide notice text 'notice' => null, // site wide notice text
'build' => 1, // build number, for code-dependent cache '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' => 'db' =>
array('database' => 'YOU HAVE TO SET THIS IN config.php', array('database' => 'YOU HAVE TO SET THIS IN config.php',