Navigation Menu

Skip to content

Commit

Permalink
CS update (indentation)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Aug 1, 2015
1 parent 93916b6 commit 5d34113
Show file tree
Hide file tree
Showing 3 changed files with 532 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -115,4 +115,4 @@ rules:
#
# Our custom rules
#
#nodeca/indent: [ 2, spaces, 2 ]
nodeca/indent: [ 2, spaces, 2 ]
28 changes: 14 additions & 14 deletions bridge.js
Expand Up @@ -12,10 +12,10 @@ var callback_stack = [];
phantom.onError = function (msg, trace) {
var msgStack = [ 'PHANTOM ERROR: ' + msg ];
if (trace && trace.length) {
msgStack.push('TRACE:');
trace.forEach(function(t) {
msgStack.push(' -> ' + (t.file || t.sourceURL) + ': ' + t.line + (t.function ? ' (in function ' + t.function + ')' : ''));
});
msgStack.push('TRACE:');
trace.forEach(function(t) {
msgStack.push(' -> ' + (t.file || t.sourceURL) + ': ' + t.line + (t.function ? ' (in function ' + t.function + ')' : ''));
});
}
system.stderr.writeLine(msgStack.join('\n'));
phantom.exit(1);
Expand Down Expand Up @@ -145,16 +145,16 @@ var callbacks = [

function setup_callbacks (id, page) {
callbacks.forEach(function (cb) {
page[cb] = function (parm) {
var args = Array.prototype.slice.call(arguments);
if ((cb === 'onResourceRequested') && (parm.url.indexOf('data:image') === 0)) {
return;
}
// console.log('Callback: ' + cb);
if (cb === 'onClosing') { args = []; }
callback_stack.push({ 'page_id': id, 'callback': cb, 'args': args });
// console.log('Callback stack size now: ' + callback_stack.length);
};
page[cb] = function (parm) {
var args = Array.prototype.slice.call(arguments);
if ((cb === 'onResourceRequested') && (parm.url.indexOf('data:image') === 0)) {
return;
}
// console.log('Callback: ' + cb);
if (cb === 'onClosing') { args = []; }
callback_stack.push({ 'page_id': id, 'callback': cb, 'args': args });
// console.log('Callback stack size now: ' + callback_stack.length);
};
});
// Special case this
page.onPageCreated = function (page) {
Expand Down

0 comments on commit 5d34113

Please sign in to comment.