mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
Various minor JSHint fixes.
Summary: Various fixes as suggested by JSHint. Test Plan: Eye-balled it. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9783
This commit is contained in:
parent
6d51958b5c
commit
7304e29dec
5 changed files with 12 additions and 14 deletions
|
@ -62,10 +62,9 @@ if (process.getuid() !== 0) {
|
|||
|
||||
var net = require('net');
|
||||
var http = require('http');
|
||||
var url = require('url');
|
||||
|
||||
process.on('uncaughtException', function(err) {
|
||||
debug.log("\n<<< UNCAUGHT EXCEPTION! >>>\n" + err.stack);
|
||||
debug.log('\n<<< UNCAUGHT EXCEPTION! >>>\n' + err.stack);
|
||||
|
||||
process.exit(1);
|
||||
});
|
||||
|
@ -188,7 +187,7 @@ var receive_server = http.createServer(function(request, response) {
|
|||
}
|
||||
});
|
||||
} else if (request.url == '/status/') {
|
||||
request.on('data', function(data) {
|
||||
request.on('data', function() {
|
||||
// We just ignore the request data, but newer versions of Node don't
|
||||
// get to 'end' if we don't process the data. See T2953.
|
||||
});
|
||||
|
@ -213,7 +212,6 @@ var receive_server = http.createServer(function(request, response) {
|
|||
response.write('400 Bad Request');
|
||||
response.end();
|
||||
}
|
||||
|
||||
}).listen(config.admin, config.host);
|
||||
|
||||
function transmit(msg) {
|
||||
|
|
|
@ -46,7 +46,7 @@ JX.install('AphlictFlashPolicyServer', {
|
|||
this._log('<FlashPolicy> Socket Error: %s', error);
|
||||
},
|
||||
|
||||
_log: function(pattern) {
|
||||
_log: function() {
|
||||
this._debug && this._debug.log.apply(this._debug, arguments);
|
||||
},
|
||||
|
||||
|
@ -60,7 +60,7 @@ JX.install('AphlictFlashPolicyServer', {
|
|||
'</cross-domain-policy>'
|
||||
];
|
||||
|
||||
return policy.join("\n") + "\0";
|
||||
return policy.join('\n') + '\0';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ JX.install('AphlictLog', {
|
|||
return this;
|
||||
},
|
||||
|
||||
log: function(pattern) {
|
||||
log: function() {
|
||||
var str = util.format.apply(null, arguments);
|
||||
var date = new Date().toLocaleString();
|
||||
str = '[' + date + '] ' + str;
|
||||
|
@ -43,7 +43,7 @@ JX.install('AphlictLog', {
|
|||
}
|
||||
|
||||
for (ii = 0; ii < this._writeToLogs.length; ii++) {
|
||||
this._writeToLogs[ii].write(str + "\n");
|
||||
this._writeToLogs[ii].write(str + '\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
JX.behavior('differential-comment-jump', function() {
|
||||
function handle_jump(offset) {
|
||||
return (function(e) {
|
||||
return function(e) {
|
||||
var parent = JX.$('differential-review-stage');
|
||||
var clicked = e.getNode('differential-inline-comment');
|
||||
var inlines = JX.DOM.scry(parent, 'div', 'differential-inline-comment');
|
||||
|
@ -24,7 +24,7 @@ JX.behavior('differential-comment-jump', function() {
|
|||
});
|
||||
JX.DOM.scrollTo(jumpto);
|
||||
e.kill();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
JX.Stratcom.listen('click', 'differential-inline-prev', handle_jump(-1));
|
||||
|
|
|
@ -131,12 +131,12 @@ JX.behavior('phabricator-remarkup-assist', function(config) {
|
|||
break;
|
||||
case 'fa-code':
|
||||
sel = sel || 'foreach ($list as $item) {\n work_miracles($item);\n}';
|
||||
var prefix = (r.start === 0) ? '' : '\n';
|
||||
update(area, prefix + '```\n', sel, '\n```');
|
||||
var code_prefix = (r.start === 0) ? '' : '\n';
|
||||
update(area, code_prefix + '```\n', sel, '\n```');
|
||||
break;
|
||||
case 'fa-table':
|
||||
var prefix = (r.start === 0 ? '' : '\n\n');
|
||||
update(area, prefix + '| ', sel || pht('data'), ' |');
|
||||
var table_prefix = (r.start === 0 ? '' : '\n\n');
|
||||
update(area, table_prefix + '| ', sel || pht('data'), ' |');
|
||||
break;
|
||||
case 'fa-meh-o':
|
||||
new JX.Workflow('/macro/meme/create/')
|
||||
|
|
Loading…
Reference in a new issue