Merge branch 'master' into release/v1.1.0

This commit is contained in:
Yuya Ochiai
2016-03-30 20:47:13 +09:00
2 changed files with 13 additions and 0 deletions

View File

@@ -50,6 +50,18 @@ var mainWindow = null;
var trayIcon = null;
var willAppQuit = false;
app.on('login', function(event, webContents, request, authInfo, callback) {
event.preventDefault();
var readlineSync = require('readline-sync');
console.log("HTTP basic auth requiring login, please provide login data.");
var username = readlineSync.question('Username: ');
var password = readlineSync.question('Password: ', {
hideEchoBack: true
});
console.log("Replacing default auth behaviour.");
callback(username, password);
});
// Quit when all windows are closed.
app.on('window-all-closed', function() {
// On OS X it is common for applications and their menu bar