tool.init();
else
panel.textContent = tool.name + ' is disabled. To enable add ' +
- ' PDFBug_' + tool.id + '=true to the url query ' +
- 'parameters and refresh.';
+ ' "' + tool.id + '" to the pdfBug parameter ' +
+ 'and refresh (seperate multiple by commas).';
buttons.push(panelButton);
}
this.selectPanel(0);
if ('disableTextLayer' in params)
PDFJS.disableTextLayer = (params['disableTextLayer'] === 'true');
- if ('PDFBug' in params)
- PDFJS.pdfBug = (params['PDFBug'] === 'true');
-
- if (PDFJS.pdfBug) {
+ if ('pdfBug' in params) {
+ PDFJS.pdfBug = true;
+ var pdfBug = params['pdfBug'];
+ var all = false, enabled = [];
+ if (pdfBug === 'all')
+ all = true;
+ else
+ enabled = pdfBug.split(',');
var debugTools = PDFBug.tools;
for (var i = 0; i < debugTools.length; ++i) {
var tool = debugTools[i];
- var key = 'PDFBug_' + tool.id;
- if (key in params)
- tool.enabled = (params[key] === 'true');
+ if (all || enabled.indexOf(tool.id) !== -1)
+ tool.enabled = true;
}
PDFBug.init();
}