aboutsummaryrefslogtreecommitdiff
path: root/assets/js/lustiges-script.js
diff options
context:
space:
mode:
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});