blob: 2aa186bca0843eebf1e675a7020737bd88c15ad4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/**
* Checks if the page is displayed in an iframe. If not redirect to /.
**/
function redirectIfNotDisplayedInFrame () {
try {
if (window.frameElement) {
return;
}
} catch (e) {}
window.location.href = '/';
}
redirectIfNotDisplayedInFrame();
PDFJS.openExternalLinksInNewWindow = true;
PDFJS.isEvalSupported = false;
PDFJS.workerSrc = document.getElementsByTagName('head')[0].getAttribute('data-workersrc');
PDFViewerApplication.download = function() {
window.open(decodeURIComponent(window.location.search.substr(6)), '_blank');
};
|