asciinema.org/app/views/asciicasts/raw.html.slim

24 lines
680 B
Plaintext
Raw Normal View History

2013-06-12 19:52:15 +00:00
= player @asciicast
p.powered
' Powered by
a href=root_url target="_top" asciinema
2013-06-12 19:52:15 +00:00
javascript:
$(function() {
var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
if (typeof target != "undefined" && window !== window.parent) {
var w = $(document).width();
var h = $(document).height();
2013-06-12 19:52:15 +00:00
target.postMessage(['asciicast:size', { id: #{@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);
});