diff --git a/seahub/templates/snippets/file_content_js.html b/seahub/templates/snippets/file_content_js.html index 2f0e77ef57..1cc9eccdba 100644 --- a/seahub/templates/snippets/file_content_js.html +++ b/seahub/templates/snippets/file_content_js.html @@ -92,7 +92,7 @@ window.onload = function () { {% endif %} {% if filetype == 'PDF' and use_pdfjs %} -if (!($.browser.msie && parseInt($.browser.version) < 10)) { +try { PDFJS.workerSrc = '{{MEDIA_URL}}js/pdf.worker.js'; $('#file-view').html('
{% trans "You can use IE 10 or other browsers, for example, Firefox, to view it online." %}