Clean up no-unused-vars lint errors

This commit is contained in:
Kevin Sawicki 2016-01-19 14:49:40 -08:00
parent ccce284a5b
commit 70bcb0ac5a
36 changed files with 228 additions and 344 deletions

View file

@ -50,25 +50,24 @@ var loadedExtensions = null;
var loadedExtensionsPath = null;
app.on('will-quit', function() {
var e, error1, error2;
try {
loadedExtensions = Object.keys(extensionInfoMap).map(function(key) {
return extensionInfoMap[key].srcDirectory;
});
try {
fs.mkdirSync(path.dirname(loadedExtensionsPath));
} catch (error1) {
e = error1;
} catch (error) {
// Ignore error
}
return fs.writeFileSync(loadedExtensionsPath, JSON.stringify(loadedExtensions));
} catch (error2) {
e = error2;
} catch (error) {
// Ignore error
}
});
// We can not use protocol or BrowserWindow until app is ready.
app.once('ready', function() {
var BrowserWindow, chromeExtensionHandler, e, error1, i, init, len, protocol, srcDirectory;
var BrowserWindow, chromeExtensionHandler, i, init, len, protocol, srcDirectory;
protocol = electron.protocol, BrowserWindow = electron.BrowserWindow;
// Load persistented extensions.
@ -84,8 +83,8 @@ app.once('ready', function() {
srcDirectory = loadedExtensions[i];
getExtensionInfoFromPath(srcDirectory);
}
} catch (error1) {
e = error1;
} catch (error) {
// Ignore error
}
// The chrome-extension: can map a extension URL request to real file path.