Cache extension metadata
This commit is contained in:
parent
ea9d2dadf8
commit
2367cd574e
1 changed files with 6 additions and 2 deletions
|
@ -8,9 +8,13 @@ const {ipcRenderer} = require('electron')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
|
let metadata
|
||||||
|
|
||||||
const getExtensionMetadata = () => {
|
const getExtensionMetadata = () => {
|
||||||
// FIXME(kevinsawicki) Either cache this or don't use sync IPC to obtain it
|
if (!metadata) {
|
||||||
return ipcRenderer.sendSync('CHROME_I18N_MANIFEST', chrome.runtime.id)
|
metadata = ipcRenderer.sendSync('CHROME_I18N_MANIFEST', chrome.runtime.id)
|
||||||
|
}
|
||||||
|
return metadata
|
||||||
}
|
}
|
||||||
|
|
||||||
const getMessagesPath = (language) => {
|
const getMessagesPath = (language) => {
|
||||||
|
|
Loading…
Reference in a new issue