asciinema.org/app/views/api/asciicasts/show.html.slim
2015-04-26 15:55:33 +00:00

24 lines
724 B
Plaintext

= player page.asciicast, page.playback_options
p.powered
' Powered by
a href=root_url target="_top" asciinema
javascript:
$(function() {
var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
if (typeof target != "undefined" && window !== window.parent) {
var w = $('.asciinema-player').width();
var h = $(document).height();
target.postMessage(['asciicast:size', { id: '#{page.asciicast_id}', width: w, height: h }], '*');
}
function onMessage(e) {
var event = e.data[0];
if (event == 'asciicast:play') {
$('.start-prompt').click();
}
}
window.addEventListener("message", onMessage, false);
});