diff options
Diffstat (limited to '')
-rw-r--r-- | assets/css/_embed.less | 8 | ||||
-rw-r--r-- | assets/css/_structure.less | 1 | ||||
-rw-r--r-- | assets/js/lustiges-script.js | 22 |
3 files changed, 29 insertions, 2 deletions
diff --git a/assets/css/_embed.less b/assets/css/_embed.less new file mode 100644 index 0000000..76c0ecd --- /dev/null +++ b/assets/css/_embed.less @@ -0,0 +1,8 @@ +body.embed { + padding: 0; + overflow: hidden; +} + +.embed-form input[type=text] { + cursor: pointer !important; +} diff --git a/assets/css/_structure.less b/assets/css/_structure.less index 5d8957c..c9b1e4b 100644 --- a/assets/css/_structure.less +++ b/assets/css/_structure.less @@ -83,3 +83,4 @@ body { @import "_relive.less"; @import "_multiview.less"; @import "_closed.less"; +@import "_embed.less"; diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index 417b234..09d4ef1 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -151,12 +151,12 @@ $(function() { } })(mejs.i18n.locale.strings); - $('body.room video').mediaelementplayer({ + $('body.room video, body.embed video').mediaelementplayer({ pluginPath: 'assets/mejs/', features: ['playpause', 'volume', 'fullscreen'], enableAutosize: true }); - $('body.room audio').mediaelementplayer({ + $('body.room audio, body.embed audio').mediaelementplayer({ features: ['playpause', 'volume', 'current'] }); @@ -522,3 +522,21 @@ $(function() { renderFrame(); }); }); + +// embed-form +$(function() { + $('.embed-form #size').on('click', function() { + var + $size = $(this), + selected = $size.val().split(','), + $codefield = $('#embed-code') + $iframe = $( $codefield.val() ), + $iframe.attr({width: selected[0], height: selected[1]}); + + $codefield.val( $iframe.prop('outerHTML') ); + }).trigger('click'); + + $('.embed-form').on('click', 'input[type=text]', function() { + $(this).select(); + }); +}); |