[services/iframe-scrolling]Autorisation du scroll dans l'iframe
Dans le service iframe dynamisation du paramettre scrolling via un attribut scrolling/data-scrolling Valeur par défaut 'no' afin de conserver la rétrocompatibilité
This commit is contained in:
parent
104714a399
commit
3386656bf3
|
|
@ -16,9 +16,14 @@ tarteaucitron.services.iframe = {
|
|||
width = tarteaucitron.getElemAttr(x,"width"),
|
||||
height = tarteaucitron.getElemAttr(x,"height"),
|
||||
allowfullscreen = tarteaucitron.getElemAttr(x,"allowfullscreen"),
|
||||
scrolling = (tarteaucitron.getElemAttr(x,"scrolling")),
|
||||
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 () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue