chore: update to standard 12

This commit is contained in:
Samuel Attard 2018-09-14 02:10:51 +10:00
parent 9e85bdb02c
commit 558fff69e7
No known key found for this signature in database
GPG key ID: E89DDE5742D58C4E
198 changed files with 4455 additions and 2940 deletions

View file

@ -1,4 +1,4 @@
const {ipcRenderer} = require('electron')
const { ipcRenderer } = require('electron')
const Event = require('./extensions/event')
const url = require('url')
@ -99,14 +99,14 @@ exports.injectTo = function (extensionId, isBackgroundPage, context) {
// Parse the optional args.
let targetExtensionId = extensionId
let connectInfo = {name: ''}
let connectInfo = { name: '' }
if (args.length === 1) {
connectInfo = args[0]
} else if (args.length === 2) {
[targetExtensionId, connectInfo] = args
}
const {tabId, portId} = ipcRenderer.sendSync('CHROME_RUNTIME_CONNECT', targetExtensionId, connectInfo)
const { tabId, portId } = ipcRenderer.sendSync('CHROME_RUNTIME_CONNECT', targetExtensionId, connectInfo)
return new Port(tabId, portId, extensionId, connectInfo.name)
},