1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Only enable pdfDebug for the extension if a pref is set.

This commit is contained in:
Brendan Dahl 2012-03-14 15:34:12 -07:00
parent 6833f64db3
commit abf8fe39ac
2 changed files with 5 additions and 1 deletions

View file

@ -66,6 +66,9 @@ ChromeActions.prototype = {
if (this.inPrivateBrowswing)
return '{}';
return application.prefs.getValue(EXT_PREFIX + '.database', '{}');
},
pdfBugEnabled: function() {
return application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false);
}
};

View file

@ -1182,7 +1182,8 @@ window.addEventListener('load', function webViewerLoad(evt) {
if ('disableTextLayer' in hashParams)
PDFJS.disableTextLayer = (hashParams['disableTextLayer'] === 'true');
if ('pdfBug' in hashParams) {
if ('pdfBug' in hashParams &&
(!PDFJS.isFirefoxExtension || FirefoxCom.request('pdfBugEnabled'))) {
PDFJS.pdfBug = true;
var pdfBug = hashParams['pdfBug'];
var enabled = pdfBug.split(',');