Merge pull request #8116 from Snuffleupagus/download_manager-preprocessor

Get rid of a couple `eslint-disable` statements in `web/download_manager.js` by instead relying on the preprocessor dead-code removal added in PR 7942
This commit is contained in:
Tim van der Meij 2017-02-28 22:03:47 +01:00 committed by GitHub
commit 522281c01d

View File

@ -25,8 +25,10 @@
factory((root.pdfjsWebDownloadManager = {}), root.pdfjsWebPDFJS); factory((root.pdfjsWebDownloadManager = {}), root.pdfjsWebPDFJS);
} }
}(this, function (exports, pdfjsLib) { }(this, function (exports, pdfjsLib) {
if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC || CHROME')) { if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
// eslint-disable-next-line no-inner-declarations return;
}
function download(blobUrl, filename) { function download(blobUrl, filename) {
var a = document.createElement('a'); var a = document.createElement('a');
if (a.click) { if (a.click) {
@ -63,7 +65,7 @@ if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC || CHROME')) {
} }
} }
function DownloadManager() {} // eslint-disable-line no-inner-declarations function DownloadManager() {}
DownloadManager.prototype = { DownloadManager.prototype = {
downloadUrl: function DownloadManager_downloadUrl(url, filename) { downloadUrl: function DownloadManager_downloadUrl(url, filename) {
@ -106,5 +108,4 @@ if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC || CHROME')) {
}; };
exports.DownloadManager = DownloadManager; exports.DownloadManager = DownloadManager;
}
})); }));