Clean up PDF.js snippet
This commit is contained in:
parent
24babe76a1
commit
36ad2c45b5
@ -74,7 +74,9 @@ def _generate_pdfjs_script(url):
|
|||||||
PDFJS.disableCreateObjectURL = true;
|
PDFJS.disableCreateObjectURL = true;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
PDFJS.verbosity = PDFJS.VERBOSITY_LEVELS.info;
|
PDFJS.verbosity = PDFJS.VERBOSITY_LEVELS.info;
|
||||||
(window.PDFView || window.PDFViewerApplication).open("{{ url }}");
|
|
||||||
|
const viewer = window.PDFView || window.PDFViewerApplication;
|
||||||
|
viewer.open("{{ url }}");
|
||||||
});
|
});
|
||||||
""").render(
|
""").render(
|
||||||
url=javascript.string_escape(url.toString(QUrl.FullyEncoded)),
|
url=javascript.string_escape(url.toString(QUrl.FullyEncoded)),
|
||||||
|
Loading…
Reference in New Issue
Block a user