From eed207f8dfd68117715518c83fc32d3ae9e1e094 Mon Sep 17 00:00:00 2001 From: dedeibel Date: Sun, 10 Dec 2017 18:02:48 +0100 Subject: Allowed multi translation for embedding, fixed autoplay option --- assets/js/lustiges-script.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index c14de15..22c4e04 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -374,7 +374,13 @@ $(function() { if(!originalsrc) originalsrc = $iframe.attr('src'); - var src = originalsrc + (autoplay ? '' : 'no-autoplay/'); + var src = originalsrc; + if (! autoplay) { + if (src.slice(-1) !== '/') { + src += '/'; + } + src += 'no-autoplay' + } $iframe.attr({width: selected[0], height: selected[1]}); $iframe.attr({src: src}); -- cgit v1.2.3