standardize by hand

This commit is contained in:
Zeke Sikelianos 2016-03-28 17:40:40 -07:00 committed by Kevin Sawicki
parent e6698102c9
commit 2c3cacdc08
8 changed files with 16 additions and 15 deletions

View file

@ -93,7 +93,7 @@ Menu.prototype._init = function () {
this.commandsMap = {}
this.groupsMap = {}
this.items = []
return this.delegate = {
this.delegate = {
isCommandIdChecked: (commandId) => {
var command = this.commandsMap[commandId]
return command != null ? command.checked : undefined
@ -142,7 +142,7 @@ Menu.prototype._init = function () {
}
Menu.prototype.popup = function (window, x, y, positioningItem) {
if (typeof window != 'object' || window.constructor !== BrowserWindow) {
if (typeof window !== 'object' || window.constructor !== BrowserWindow) {
// Shift.
positioningItem = y
y = x
@ -224,7 +224,7 @@ Menu.prototype.insert = function (pos, item) {
// Remember the items.
this.items.splice(pos, 0, item)
return this.commandsMap[item.commandId] = item
this.commandsMap[item.commandId] = item
}
// Force menuWillShow to be called
@ -284,7 +284,7 @@ Menu.buildFromTemplate = function (template) {
}
positionedTemplate.splice(insertIndex, 0, item)
}
menu = new Menu
menu = new Menu()
for (k = 0, len1 = positionedTemplate.length; k < len1; k++) {
item = positionedTemplate[k]
if (typeof item !== 'object') {

View file

@ -27,7 +27,7 @@ Object.defineProperty(exports, 'defaultSession', {
var wrapSession = function (session) {
// session is an EventEmitter.
return session.__proto__ = EventEmitter.prototype
session.__proto__ = EventEmitter.prototype
}
bindings._setWrapSession(wrapSession)

View file

@ -17,7 +17,7 @@ Tray.prototype.setContextMenu = function (menu) {
this._setContextMenu(menu)
// Keep a strong reference of menu.
return this.menu = menu
this.menu = menu
}
module.exports = Tray

View file

@ -168,7 +168,7 @@ let wrapWebContents = function (webContents) {
deprecate.event(webContents, 'page-title-set', 'page-title-updated', function (...args) {
return this.emit.apply(this, ['page-title-set'].concat(args))
})
return webContents.printToPDF = function (options, callback) {
webContents.printToPDF = function (options, callback) {
var printingSetting
printingSetting = {
pageRage: [],