Преглед на файлове

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

Jean-Baptiste Motto преди 4 години
родител
ревизия
2452c5b924
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      tarteaucitron.services.js

+ 3 - 2
tarteaucitron.services.js

@@ -733,9 +733,10 @@ tarteaucitron.services.calameo = {
                 id = x.getAttribute("data-id"),
                 width = x.getAttribute("width"),
                 height = x.getAttribute("height"),
-                url = '//v.calameo.com/?bkcode=' + id;
+                url = '//v.calameo.com/?bkcode=' + id,
+                allowfullscreen = x.getAttribute("allowfullscreen");
 
-            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 () {