From 5292d862504e25b80cc517ba8be7a49250c86f5b Mon Sep 17 00:00:00 2001 From: nstCactus Date: Tue, 28 Jan 2020 12:47:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20vimeo=20service=20data-att?= =?UTF-8?q?ributes=20parsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.services.js | 156 +++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 79 deletions(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index c6b5a6e..010e0e8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -62,7 +62,7 @@ tarteaucitron.services.amplitude = { function v(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}for(var n=0;n 0 || video_byline.length > 0 || video_portrait.length > 0) { + var video_qs = "?"; - video_qs = "?"; + if (video_title.length > 0) { + video_qs += "title=" + video_title; + } - if (video_title.length > 0) { - video_qs += "title=" + video_title; + if (video_byline.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "byline=" + video_byline; + } - if (video_byline.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "byline=" + video_byline; + if (video_portrait.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "portrait=" + video_portrait; + } - if (video_portrait.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "portrait=" + video_portrait; + if (video_loop.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "loop=" + video_loop; + } - if (video_loop.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "loop=" + video_loop; + if (video_autoplay.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "autoplay=" + video_autoplay; + } - if (video_autoplay.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "autoplay=" + video_autoplay; + if (video_autopause.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "autopause=" + video_autopause; + } - if (video_autopause.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "autopause=" + video_autopause; + if (video_background.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "background=" + video_background; + } - if (video_background.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "background=" + video_background; + if (video_color.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "color=" + video_color; + } - if (video_color.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "color=" + video_color; + if (video_controls.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "controls=" + video_controls; + } - if (video_controls.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "controls=" + video_controls; + if (video_maxheight.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "maxheight=" + video_maxheight; + } - if (video_maxheight.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "maxheight=" + video_maxheight; + if (video_maxwidth.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "maxwidth=" + video_maxwidth; + } - if (video_maxwidth.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "maxwidth=" + video_maxwidth; + if (video_muted.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "muted=" + video_muted; + } - if (video_muted.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "muted=" + video_muted; + if (video_playsinline.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "playsinline=" + video_playsinline; + } - if (video_playsinline.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "playsinline=" + video_playsinline; + if (video_speed.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "speed=" + video_speed; + } - if (video_speed.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "speed=" + video_speed; + if (video_transparent.length > 0) { + if (video_qs.length > 0) { + video_qs += "&"; } + video_qs += "transparent=" + video_transparent; + } - if (video_transparent.length > 0) { - if (video_qs.length > 1) { - video_qs += "&"; - } - video_qs += "transparent=" + video_transparent; - } - - + if (video_qs === "?") { + video_qs = ""; } video_frame = '';