-
Notifications
You must be signed in to change notification settings - Fork 969
Fix extension ID for PDFJS #2527
Conversation
@@ -36,7 +36,7 @@ let windowState = Immutable.fromJS({ | |||
let lastEmittedState | |||
|
|||
const CHANGE_EVENT = 'change' | |||
const PDFJS_ORIGIN = 'chrome-extension://adnmjfhcejodgpaljdmlmjoclihpcfka/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main bug that here it is using adnmjfhcejodgpaljdmlmjoclihpcfka
but above it installs as oemmndcbldboiebfnladdacbdfmadadm
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
@@ -40,5 +40,6 @@ module.exports = { | |||
authUrl: (userId) => `${vaultHost}/v1/users/${userId}`, | |||
replacementUrl: adHost | |||
}, | |||
braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd' | |||
braveExtensionId: 'mnojpmjdmbbfmejpflffifhffcmidifd', | |||
PDFJSExtensionId: 'ckglimbbooghmggmkikhbolcfmgniemo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where did you get this ID from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this change, pdfjs doesn't load for me at all (same thing that was happening for you before this change). i.e., chrome-extension://ckglimbbooghmggmkikhbolcfmgniemo/https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf is blank but chrome-extension://adnmjfhcejodgpaljdmlmjoclihpcfka/https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf loads fine. maybe this origin is unique per install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in chrome, the PDF viewer origin is chrome-extension://oemmndcbldboiebfnladdacbdfmadadm
which makes more sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appears that chrome.extension.getURL
is returning a random(?) value in
var VIEWER_URL = chrome.extension.getURL('content/web/viewer.html'); |
chrome-extension://<extension_id>
. this does not seem to be an issue in chrome. @bridiver ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is all worked out in the follow up commit by the way by Yan. I got the ID from the one that is used when opening PDFs from a link.
Just pushed a fix for the extension URL inconsistency issue so now it works for me. @bbondy please check that it works for you. |
Excellent, works perfectly! Thanks! |
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, @diracdeltas