Add "embed" css/js bundles
parent
d1dcd08861
commit
f22837f4e9
@ -0,0 +1,2 @@
|
||||
//= require application
|
||||
//= require player
|
@ -0,0 +1,4 @@
|
||||
//= require player
|
||||
|
||||
body.iframe
|
||||
background-color: transparent
|
@ -1,11 +1,11 @@
|
||||
<%= player @asciicast %>
|
||||
<script>
|
||||
= player @asciicast
|
||||
|
||||
javascript:
|
||||
$(function() {
|
||||
var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
|
||||
if (typeof target != "undefined" && window !== window.parent) {
|
||||
var w = $('.player').css('width');
|
||||
var h = $('.player').css('height');
|
||||
target.postMessage(['asciicast:size', { id: <%= @asciicast.id %>, width: w, height: h }], '*');
|
||||
target.postMessage(['asciicast:size', { id: #{@asciicast.id}, width: w, height: h }], '*');
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue