chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -1,15 +1,15 @@
|
|||
const {app, ipcMain, webContents, BrowserWindow} = require('electron')
|
||||
const {getAllWebContents} = process.atomBinding('web_contents')
|
||||
const { app, ipcMain, webContents, BrowserWindow } = require('electron')
|
||||
const { getAllWebContents } = process.atomBinding('web_contents')
|
||||
const renderProcessPreferences = process.atomBinding('render_process_preferences').forAllWebContents()
|
||||
|
||||
const {Buffer} = require('buffer')
|
||||
const { Buffer } = require('buffer')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const url = require('url')
|
||||
|
||||
// Mapping between extensionId(hostname) and manifest.
|
||||
const manifestMap = {} // extensionId => manifest
|
||||
const manifestNameMap = {} // name => manifest
|
||||
const manifestMap = {} // extensionId => manifest
|
||||
const manifestNameMap = {} // name => manifest
|
||||
const devToolsExtensionNames = new Set()
|
||||
|
||||
const generateExtensionIdFromName = function (name) {
|
||||
|
@ -154,7 +154,7 @@ ipcMain.on('CHROME_RUNTIME_CONNECT', function (event, extensionId, connectInfo)
|
|||
}
|
||||
|
||||
const portId = ++nextId
|
||||
event.returnValue = {tabId: page.webContents.id, portId: portId}
|
||||
event.returnValue = { tabId: page.webContents.id, portId: portId }
|
||||
|
||||
event.sender.once('render-view-deleted', () => {
|
||||
if (page.webContents.isDestroyed()) return
|
||||
|
@ -318,7 +318,7 @@ const chromeExtensionHandler = function (request, callback) {
|
|||
if (err) {
|
||||
// Disabled due to false positive in StandardJS
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
return callback(-6) // FILE_NOT_FOUND
|
||||
return callback(-6) // FILE_NOT_FOUND
|
||||
} else {
|
||||
return callback(content)
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ app.once('ready', function () {
|
|||
const extensions = {}
|
||||
Object.keys(manifestNameMap).forEach(function (name) {
|
||||
const manifest = manifestNameMap[name]
|
||||
extensions[name] = {name: manifest.name, version: manifest.version}
|
||||
extensions[name] = { name: manifest.name, version: manifest.version }
|
||||
})
|
||||
return extensions
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue