Remove extra newlines around comments

This commit is contained in:
Kevin Sawicki 2016-01-14 11:10:12 -08:00
parent 990dc30e8d
commit 030d2a843c
40 changed files with 103 additions and 425 deletions

View file

@ -53,9 +53,7 @@ app.getAppPath = function() {
return appPath;
};
// Routes the events to webContents.
ref1 = ['login', 'certificate-error', 'select-client-certificate'];
fn = function(name) {
return app.on(name, function() {
@ -69,7 +67,6 @@ for (i = 0, len = ref1.length; i < len; i++) {
fn(name);
}
// Deprecated.
app.getHomeDir = deprecate('app.getHomeDir', 'app.getPath', function() {
@ -108,9 +105,7 @@ deprecate.event(app, 'activate-with-no-open-windows', 'activate', function(event
deprecate.event(app, 'select-certificate', 'select-client-certificate');
// Wrappers for native classes.
wrapDownloadItem = function(downloadItem) {
// downloadItem is an EventEmitter.
@ -125,7 +120,5 @@ wrapDownloadItem = function(downloadItem) {
downloadItemBindings._setWrapDownloadItem(wrapDownloadItem);
// Only one App object pemitted.
module.exports = app;

View file

@ -4,11 +4,7 @@ deprecate = require('electron').deprecate;
autoUpdater = process.platform === 'win32' ? require('./auto-updater/auto-updater-win') : require('./auto-updater/auto-updater-native');
// Deprecated.
deprecate.rename(autoUpdater, 'setFeedUrl', 'setFeedURL');
module.exports = autoUpdater;

View file

@ -61,16 +61,12 @@ spawnUpdate = function(args, detached, callback) {
});
};
// Start an instance of the installed app.
exports.processStart = function(callback) {
return spawnUpdate(['--processStart', exeName], true, function() {});
};
// Download the releases specified by the URL and write new results to stdout.
exports.download = function(updateURL, callback) {
return spawnUpdate(['--download', updateURL], false, function(error, stdout) {
var error1, json, ref, ref1, update;
@ -91,14 +87,12 @@ exports.download = function(updateURL, callback) {
// Update the application to the latest remote version specified by URL.
exports.update = function(updateURL, callback) {
return spawnUpdate(['--update', updateURL], false, callback);
};
// Is the Update.exe installed with the current application?
exports.supported = function() {
var error1;
try {

View file

@ -151,7 +151,6 @@ BrowserWindow.fromDevToolsWebContents = function(webContents) {
}
};
// Helpers.
BrowserWindow.prototype.loadURL = function() {
@ -198,7 +197,6 @@ BrowserWindow.prototype.inspectServiceWorker = function() {
return this.webContents.inspectServiceWorker();
};
// Deprecated.
deprecate.member(BrowserWindow, 'undo', 'webContents');

View file

@ -23,14 +23,12 @@ messageBoxOptions = {
parseArgs = function(window, options, callback) {
if (!(window === null || (window != null ? window.constructor : void 0) === BrowserWindow)) {
// Shift.
callback = options;
options = window;
window = null;
}
if ((callback == null) && typeof options === 'function') {
// Shift.
callback = options;
options = null;
@ -165,9 +163,7 @@ module.exports = {
}
};
// Mark standard asynchronous functions.
ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
for (j = 0, len = ref1.length; j < len; j++) {
api = ref1[j];

View file

@ -4,7 +4,6 @@ common = require('../../../../common/api/lib/exports/electron');
// Import common modules.
common.defineProperties(exports);
Object.defineProperties(exports, {

View file

@ -2,9 +2,7 @@ var deprecate, ipcMain, ref;
ref = require('electron'), deprecate = ref.deprecate, ipcMain = ref.ipcMain;
// This module is deprecated, we mirror everything from ipcMain.
deprecate.warn('ipc module', 'require("electron").ipcMain');
module.exports = ipcMain;

View file

@ -4,9 +4,7 @@ v8Util = process.atomBinding('v8_util');
nextCommandId = 0;
// Maps role to methods of webContents
rolesMap = {
undo: 'undo',
redo: 'redo',
@ -18,9 +16,7 @@ rolesMap = {
close: 'close'
};
// Maps methods that should be called directly on the BrowserWindow instance
methodInBrowserWindow = {
minimize: true,
close: true

View file

@ -8,17 +8,11 @@ v8Util = process.atomBinding('v8_util');
bindings = process.atomBinding('menu');
// Automatically generated radio menu item's group id.
nextGroupId = 0;
// Search between seperators to find a radio menu item and return its group id,
// otherwise generate a group id.
generateGroupId = function(items, pos) {
var i, item, j, k, ref1, ref2, ref3;
if (pos > 0) {
@ -45,9 +39,7 @@ generateGroupId = function(items, pos) {
return ++nextGroupId;
};
// Returns the index of item according to |id|.
indexOfItemById = function(items, id) {
var i, item, j, len;
for (i = j = 0, len = items.length; j < len; i = ++j) {
@ -59,9 +51,7 @@ indexOfItemById = function(items, id) {
return -1;
};
// Returns the index of where to insert the item according to |position|.
indexToInsertByPosition = function(items, position) {
var id, insertIndex, query, ref1;
if (!position) {
@ -174,7 +164,6 @@ Menu.prototype._init = function() {
Menu.prototype.popup = function(window, x, y) {
if ((window != null ? window.constructor : void 0) !== BrowserWindow) {
// Shift.
y = x;
x = window;
@ -210,7 +199,6 @@ Menu.prototype.insert = function(pos, item) {
this.insertSubMenu(pos, item.commandId, item.label, item.submenu);
break;
case 'radio':
// Grouping radio menu items.
item.overrideReadOnlyProperty('groupId', generateGroupId(this.items, pos));
if ((base = this.groupsMap)[name = item.groupId] == null) {
@ -261,7 +249,6 @@ Menu.prototype.insert = function(pos, item) {
// Force menuWillShow to be called
Menu.prototype._callMenuWillShow = function() {
var item, j, len, ref1, ref2, results;
if ((ref1 = this.delegate) != null) {
@ -323,7 +310,6 @@ Menu.buildFromTemplate = function(template) {
if (item.position) {
insertIndex = indexToInsertByPosition(positionedTemplate, item.position);
} else {
// If no |position| is specified, insert after last item.
insertIndex++;
}

View file

@ -3,9 +3,7 @@ var NavigationController, ipcMain,
ipcMain = require('electron').ipcMain;
// The history operation in renderer is redirected to browser.
ipcMain.on('ATOM_SHELL_NAVIGATION_CONTROLLER', function() {
var args, event, method, ref;
event = arguments[0], method = arguments[1], args = 3 <= arguments.length ? slice.call(arguments, 2) : [];

View file

@ -8,9 +8,7 @@ if (!app.isReady()) {
protocol = process.atomBinding('protocol').protocol;
// Warn about removed APIs.
logAndThrow = function(callback, message) {
console.error(message);
if (callback) {

View file

@ -6,9 +6,7 @@ bindings = process.atomBinding('session');
PERSIST_PERFIX = 'persist:';
// Returns the Session from |partition| string.
exports.fromPartition = function(partition) {
if (partition == null) {
partition = '';
@ -23,9 +21,7 @@ exports.fromPartition = function(partition) {
}
};
// Returns the default session.
Object.defineProperty(exports, 'defaultSession', {
enumerable: true,
get: function() {
@ -34,7 +30,6 @@ Object.defineProperty(exports, 'defaultSession', {
});
wrapSession = function(session) {
// session is an EventEmitter.
return session.__proto__ = EventEmitter.prototype;
};

View file

@ -9,7 +9,6 @@ Tray = process.atomBinding('tray').Tray;
Tray.prototype.__proto__ = EventEmitter.prototype;
Tray.prototype._init = function() {
// Deprecated.
deprecate.rename(this, 'popContextMenu', 'popUpContextMenu');
deprecate.event(this, 'clicked', 'click');

View file

@ -65,7 +65,6 @@ const webFrameMethods = [
];
wrapWebContents = function(webContents) {
// webContents is an EventEmitter.
var controller, method, name, ref1;
webContents.__proto__ = EventEmitter.prototype;