Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit 2828f43

Browse files
committed
Fix extension ID for PDFJS
Fix #2529 This was failing to load for me I think because the PDFJS_ORIGIN ID was different from the one installed. It's unclear to me if the new one that I have that is in use by my instance will be the same for everyone. This works concistently for me though and keeps the 2 IDs in sync Auditors: @bridiver
1 parent 52facf0 commit 2828f43

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/extensions.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ let generateBraveManifest = () => {
132132
}
133133

134134
let defaultExtensions = {
135-
PDFJS: 'oemmndcbldboiebfnladdacbdfmadadm',
136135
OnePassword: 'aomjjhallfgjeglblehebfpbcfeobpgk',
137136
Dashlane: 'fdjamakpfbbddfjaooikfcpapjohcfmg',
138137
LastPass: 'hdokiejnpimakedhajhdlcegeplioahd'
@@ -181,10 +180,10 @@ module.exports.init = () => {
181180
installExtension(config.braveExtensionId, getExtensionsPath('brave'), {manifest_location: 'component', manifest: generateBraveManifest()})
182181

183182
if (getSetting(settings.PDFJS_ENABLED)) {
184-
installExtension(defaultExtensions.PDFJS, getExtensionsPath('pdfjs'))
185-
enableExtension(defaultExtensions.PDFJS)
183+
installExtension(config.PDFJSExtensionId, getExtensionsPath('pdfjs'))
184+
enableExtension(config.PDFJSExtensionId)
186185
} else {
187-
disableExtension(defaultExtensions.PDFJS)
186+
disableExtension(config.PDFJSExtensionId)
188187
}
189188

190189
if (getSetting(settings.ONE_PASSWORD_ENABLED)) {

js/constants/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ module.exports = {
4040
authUrl: (userId) => `${vaultHost}/v1/users/${userId}`,
4141
replacementUrl: adHost
4242
},
43-
braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd'
43+
braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd',
44+
PDFJSExtensionId: 'ckglimbbooghmggmkikhbolcfmgniemo'
4445
}

js/stores/windowStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let windowState = Immutable.fromJS({
3636
let lastEmittedState
3737

3838
const CHANGE_EVENT = 'change'
39-
const PDFJS_ORIGIN = 'chrome-extension://adnmjfhcejodgpaljdmlmjoclihpcfka/'
39+
const PDFJS_ORIGIN = `chrome-extension://${config.PDFJSExtensionId}/`
4040

4141
const frameStatePath = (key) =>
4242
['frames', FrameStateUtil.findIndexForFrameKey(windowState.get('frames'), key)]

0 commit comments

Comments
 (0)