Add allowfullscreen param to web iframe service. Default value is allowed.

This commit is contained in:
Jean-Baptiste Motto 2021-04-29 19:37:33 +02:00
parent 3eb5a250d8
commit 1c943e413d
1 changed files with 2 additions and 1 deletions

View File

@ -15,9 +15,10 @@ tarteaucitron.services.iframe = {
var frame_title = tarteaucitron.fixSelfXSS(x.getAttribute("title")), var frame_title = tarteaucitron.fixSelfXSS(x.getAttribute("title")),
width = x.getAttribute("width"), width = x.getAttribute("width"),
height = x.getAttribute("height"), height = x.getAttribute("height"),
allowfullscreen = x.getAttribute("allowfullscreen"),
url = x.getAttribute("data-url"); url = x.getAttribute("data-url");
return '<iframe title="' + frame_title + '" src="' + url + '" width="' + width + '" height="' + height + '" scrolling="no" allowtransparency allowfullscreen></iframe>'; return '<iframe title="' + frame_title + '" src="' + url + '" width="' + width + '" height="' + height + '" scrolling="no" allowtransparency' + (allowfullscreen == '0' ? '' : ' webkitallowfullscreen mozallowfullscreen allowfullscreen') + '></iframe>';
}); });
}, },
"fallback": function () { "fallback": function () {