Enable/disable search via about:config pref
This commit is contained in:
parent
0bac4abcb5
commit
6cd9ae01cc
@ -161,6 +161,9 @@ ChromeActions.prototype = {
|
||||
},
|
||||
pdfBugEnabled: function() {
|
||||
return getBoolPref(EXT_PREFIX + '.pdfBugEnabled', false);
|
||||
},
|
||||
searchEnabled: function() {
|
||||
return getBoolPref(EXT_PREFIX + '.searchEnabled', false);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
<button id="viewOutline" class="toolbarButton group" title="Show Document Outline" onclick="PDFView.switchSidebarView('outline')" tabindex="2" data-l10n-id="outline">
|
||||
<span data-l10n-id="outline_label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewSearch" class="toolbarButton group" title="Search Document" onclick="PDFView.switchSidebarView('search')" tabindex="3" data-l10n-id="search">
|
||||
<button id="viewSearch" class="toolbarButton group hidden" title="Search Document" onclick="PDFView.switchSidebarView('search')" tabindex="3" data-l10n-id="search">
|
||||
<span data-l10n-id="search_label">Search Document</span>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1490,6 +1490,11 @@ window.addEventListener('load', function webViewerLoad(evt) {
|
||||
PDFBug.init();
|
||||
}
|
||||
|
||||
if (!PDFJS.isFirefoxExtension ||
|
||||
(PDFJS.isFirefoxExtension && FirefoxCom.request('searchEnabled'))) {
|
||||
document.querySelector('#viewSearch').classList.remove('hidden');
|
||||
}
|
||||
|
||||
var thumbsView = document.getElementById('thumbnailView');
|
||||
thumbsView.addEventListener('scroll', updateThumbViewArea, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user