mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix(pdf): update pdf iframe attributes
This commit is contained in:
parent
10d8e4332c
commit
d774729b3b
@ -120,6 +120,7 @@ var factory = function (Util) {
|
||||
var iframe = document.createElement('iframe');
|
||||
if (cfg.pdf.viewer) { // PDFJS
|
||||
var viewerUrl = cfg.pdf.viewer + '?file=' + url;
|
||||
iframe.setAttribute('sandbox', 'allow-scripts allow-downloads allow-same-origin');
|
||||
iframe.src = viewerUrl + '#' + window.encodeURIComponent(metadata.name);
|
||||
iframe.onload = function () {
|
||||
if (!metadata.name) { return; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user