1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 00:10:57 +01:00

Define function before use

Summary: Silences a JSHint warning.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11141
This commit is contained in:
Joshua Spence 2015-01-03 10:30:00 +11:00
parent d37c7013e5
commit a2ece77f99
2 changed files with 19 additions and 19 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array(
'core.pkg.css' => '094971a9',
'core.pkg.js' => '44aac665',
'darkconsole.pkg.js' => 'd326843f',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '8af45893',
'differential.pkg.js' => 'dad3622f',
'diffusion.pkg.css' => '591664fa',
@ -448,7 +448,7 @@ return array(
'rsrc/js/core/behavior-autofocus.js' => '7319e029',
'rsrc/js/core/behavior-choose-control.js' => '6153c708',
'rsrc/js/core/behavior-crop.js' => 'fa0f4fc2',
'rsrc/js/core/behavior-dark-console.js' => 'caa97e33',
'rsrc/js/core/behavior-dark-console.js' => '08883e8b',
'rsrc/js/core/behavior-device.js' => '03d6ed07',
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '92eb531d',
'rsrc/js/core/behavior-error-log.js' => '6882e80a',
@ -554,7 +554,7 @@ return array(
'javelin-behavior-conpherence-pontificate' => '85ab3c8e',
'javelin-behavior-conpherence-widget-pane' => '40b1ff90',
'javelin-behavior-countdown-timer' => 'e4cc26b3',
'javelin-behavior-dark-console' => 'caa97e33',
'javelin-behavior-dark-console' => '08883e8b',
'javelin-behavior-dashboard-async-panel' => '469c0d9e',
'javelin-behavior-dashboard-move-panels' => '82439934',
'javelin-behavior-dashboard-query-panel-select' => '453c5375',
@ -863,6 +863,14 @@ return array(
'javelin-mask',
'phabricator-drag-and-drop-file-upload',
),
'08883e8b' => array(
'javelin-behavior',
'javelin-stratcom',
'javelin-util',
'javelin-dom',
'javelin-request',
'phabricator-keyboard-shortcut',
),
'0a3f3021' => array(
'javelin-behavior',
'javelin-stratcom',
@ -1642,14 +1650,6 @@ return array(
'javelin-stratcom',
'phabricator-phtize',
),
'caa97e33' => array(
'javelin-behavior',
'javelin-stratcom',
'javelin-util',
'javelin-dom',
'javelin-request',
'phabricator-keyboard-shortcut',
),
'cc1bd0b0' => array(
'javelin-install',
'javelin-event',

View file

@ -9,14 +9,6 @@
*/
JX.behavior('dark-console', function(config, statics) {
var root = statics.root || setup_console();
config.key = config.key || root.getAttribute('data-console-key');
if (!('color' in config)) {
config.color = root.getAttribute('data-console-color');
}
// Do first-time setup.
function setup_console() {
statics.root = JX.$('darkconsole');
@ -57,6 +49,14 @@ JX.behavior('dark-console', function(config, statics) {
return statics.root;
}
var root = statics.root || setup_console();
config.key = config.key || root.getAttribute('data-console-key');
if (!('color' in config)) {
config.color = root.getAttribute('data-console-color');
}
// Add a new request to the console (initial page load, or new Ajax response).
function add_request(config) {