aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authordedeibel2017-12-10 18:02:48 +0100
committerdedeibel2017-12-10 18:27:05 +0100
commiteed207f8dfd68117715518c83fc32d3ae9e1e094 (patch)
treea130f34fc994223d6daebb4863024ca34f1dc977 /assets
parentbe515f5150f20c773371f680efad58f2d0fcaaf0 (diff)
Allowed multi translation for embedding, fixed autoplay option
Diffstat (limited to '')
-rw-r--r--assets/js/lustiges-script.js8
1 files changed, 7 insertions, 1 deletions
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});