mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
👕
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { remote } = require('electron')
|
||||
const { app } = remote;
|
||||
const { app } = remote
|
||||
|
||||
const getChromeStoragePath = (storageType, extensionId) => {
|
||||
return path.join(
|
||||
@@ -9,7 +9,7 @@ const getChromeStoragePath = (storageType, extensionId) => {
|
||||
}
|
||||
const readChromeStorageFile = (storageType, extensionId) => {
|
||||
const filePath = getChromeStoragePath(storageType, extensionId)
|
||||
if(!fs.existsSync(filePath)) return null
|
||||
if (!fs.existsSync(filePath)) return null
|
||||
return fs.readFileSync(filePath, 'utf8')
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ const getStorage = (storageType, extensionId) => {
|
||||
|
||||
const setStorage = (storageType, extensionId, storage) => {
|
||||
const json = JSON.stringify(storage)
|
||||
const data = writeChromeStorageFile(storageType, extensionId, json)
|
||||
writeChromeStorageFile(storageType, extensionId, json)
|
||||
}
|
||||
|
||||
const scheduleCallback = (items, callback) => {
|
||||
|
||||
Reference in New Issue
Block a user