Merge pull request #1046 from lucmuller/services/iframe-scrolling

[services/iframe-scrolling]Autorisation du scroll dans l'iframe
This commit is contained in:
Amauri CHAMPEAUX 2023-01-17 16:13:42 +01:00 committed by GitHub
commit ef8c443041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -16,9 +16,14 @@ tarteaucitron.services.iframe = {
width = tarteaucitron.getElemAttr(x,"width"), width = tarteaucitron.getElemAttr(x,"width"),
height = tarteaucitron.getElemAttr(x,"height"), height = tarteaucitron.getElemAttr(x,"height"),
allowfullscreen = tarteaucitron.getElemAttr(x,"allowfullscreen"), allowfullscreen = tarteaucitron.getElemAttr(x,"allowfullscreen"),
scrolling = (tarteaucitron.getElemAttr(x,"scrolling")),
url = tarteaucitron.getElemAttr(x,"url"); url = tarteaucitron.getElemAttr(x,"url");
return '<iframe title="' + frame_title + '" src="' + url + '" width="' + width + '" height="' + height + '" scrolling="no" allowtransparency' + (allowfullscreen == '0' ? '' : ' webkitallowfullscreen mozallowfullscreen allowfullscreen') + '></iframe>'; if(!scrolling){
scrolling = 'no';
}
return '<iframe title="' + frame_title + '" src="' + url + '" width="' + width + '" height="' + height + '" scrolling="'+scrolling+'" allowtransparency' + (allowfullscreen == '0' ? '' : ' webkitallowfullscreen mozallowfullscreen allowfullscreen') + '></iframe>';
}); });
}, },
"fallback": function () { "fallback": function () {