2014-01-18 13:53:15 +00:00
|
|
|
= player page.asciicast, page.playback_options
|
2013-12-14 13:54:01 +00:00
|
|
|
p.powered
|
|
|
|
' Powered by
|
|
|
|
a href=root_url target="_top" asciinema
|
2013-06-12 19:52:15 +00:00
|
|
|
|
|
|
|
javascript:
|
2016-10-01 18:09:32 +00:00
|
|
|
|
|
|
|
var player = document.getElementById('player');
|
|
|
|
|
|
|
|
player.addEventListener('attached', function() {
|
2013-06-12 19:33:30 +00:00
|
|
|
var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
|
|
|
|
if (typeof target != "undefined" && window !== window.parent) {
|
2016-10-01 18:09:32 +00:00
|
|
|
var w = player.getElementsByClassName('asciinema-player')[0].offsetWidth;
|
|
|
|
var h = Math.max(document.body.scrollHeight, document.body.offsetHeight);
|
2015-11-20 10:00:41 +00:00
|
|
|
target.postMessage(['asciicast:size', { width: w, height: h }], '*');
|
2013-06-12 19:33:30 +00:00
|
|
|
}
|
|
|
|
});
|