Clean up no-unused-vars lint errors
This commit is contained in:
parent
ccce284a5b
commit
70bcb0ac5a
36 changed files with 228 additions and 344 deletions
|
@ -60,9 +60,8 @@ var fn = function(name) {
|
|||
return webContents.emit.apply(webContents, [name, event].concat(slice.call(args)));
|
||||
});
|
||||
};
|
||||
var i, len, name;
|
||||
var i, len;
|
||||
for (i = 0, len = ref1.length; i < len; i++) {
|
||||
name = ref1[i];
|
||||
fn(ref1[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ const exeName = path.basename(process.execPath);
|
|||
// Spawn a command and invoke the callback when it completes with an error
|
||||
// and the output from standard out.
|
||||
var spawnUpdate = function(args, detached, callback) {
|
||||
var error, error1, errorEmitted, spawnedProcess, stderr, stdout;
|
||||
var error, errorEmitted, spawnedProcess, stderr, stdout;
|
||||
try {
|
||||
spawnedProcess = spawn(updateExe, args, {
|
||||
detached: detached
|
||||
|
@ -58,23 +58,22 @@ var spawnUpdate = function(args, detached, callback) {
|
|||
};
|
||||
|
||||
// Start an instance of the installed app.
|
||||
exports.processStart = function(callback) {
|
||||
exports.processStart = function() {
|
||||
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;
|
||||
var json, ref, ref1, update;
|
||||
if (error != null) {
|
||||
return callback(error);
|
||||
}
|
||||
try {
|
||||
|
||||
// Last line of output is the JSON details about the releases
|
||||
json = stdout.trim().split('\n').pop();
|
||||
update = (ref = JSON.parse(json)) != null ? (ref1 = ref.releasesToApply) != null ? typeof ref1.pop === "function" ? ref1.pop() : void 0 : void 0 : void 0;
|
||||
} catch (error1) {
|
||||
} catch (jsonError) {
|
||||
return callback("Invalid result:\n" + stdout);
|
||||
}
|
||||
return callback(null, update);
|
||||
|
@ -90,11 +89,10 @@ exports.update = function(updateURL, callback) {
|
|||
|
||||
// Is the Update.exe installed with the current application?
|
||||
exports.supported = function() {
|
||||
var error1;
|
||||
try {
|
||||
fs.accessSync(updateExe, fs.R_OK);
|
||||
return true;
|
||||
} catch (error1) {
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ BrowserWindow.prototype._init = function() {
|
|||
|
||||
// Change window title to page title.
|
||||
this.webContents.on('page-title-updated', (function(_this) {
|
||||
return function(event, title, explicitSet) {
|
||||
return function(event, title) {
|
||||
_this.emit('page-title-updated', event, title);
|
||||
if (!event.defaultPrevented) {
|
||||
return _this.setTitle(title);
|
||||
|
|
|
@ -5,7 +5,6 @@ const v8Util = process.atomBinding('v8_util');
|
|||
|
||||
var slice = [].slice;
|
||||
var includes = [].includes;
|
||||
var indexOf = [].indexOf;
|
||||
|
||||
var fileDialogProperties = {
|
||||
openFile: 1 << 0,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
var MenuItem, methodInBrowserWindow, nextCommandId, rolesMap, v8Util;
|
||||
|
||||
v8Util = process.atomBinding('v8_util');
|
||||
var MenuItem, methodInBrowserWindow, nextCommandId, rolesMap;
|
||||
|
||||
nextCommandId = 0;
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ Menu.prototype.insert = function(pos, item) {
|
|||
return v8Util.getHiddenValue(item, 'checked');
|
||||
},
|
||||
set: (function(_this) {
|
||||
return function(val) {
|
||||
return function() {
|
||||
var j, len, otherItem, ref1;
|
||||
ref1 = _this.groupsMap[item.groupId];
|
||||
for (j = 0, len = ref1.length; j < len; j++) {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
const EventEmitter = require('events').EventEmitter;
|
||||
const deprecate = require('electron').deprecate;
|
||||
const ipcMain = require('electron').ipcMain;
|
||||
const session = require('electron').session;
|
||||
const NavigationController = require('electron').NavigationController;
|
||||
const Menu = require('electron').Menu;
|
||||
|
||||
|
@ -62,7 +61,7 @@ const webFrameMethods = [
|
|||
'insertText',
|
||||
'setZoomFactor',
|
||||
'setZoomLevel',
|
||||
'setZoomLevelLimits',
|
||||
'setZoomLevelLimits'
|
||||
];
|
||||
|
||||
let wrapWebContents = function(webContents) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue