|
@ -5,5 +5,18 @@ |
|
|
<body> |
|
|
<body> |
|
|
<asciinema-player title="Linux" author="swarmlab.io" author-url="http://www.swarmlab.io" font-size="small" speed="2" theme="monokai" src="/player/demo.cast"></asciinema-player> |
|
|
<asciinema-player title="Linux" author="swarmlab.io" author-url="http://www.swarmlab.io" font-size="small" speed="2" theme="monokai" src="/player/demo.cast"></asciinema-player> |
|
|
<script src="/player/asciinema-player.js"></script> |
|
|
<script src="/player/asciinema-player.js"></script> |
|
|
|
|
|
<script> |
|
|
|
|
|
var url_string = window.location.href |
|
|
|
|
|
var url = new URL(url_string); |
|
|
|
|
|
var item = url.searchParams.get("item"); |
|
|
|
|
|
var llo = url.searchParams.get("llo"); |
|
|
|
|
|
var src = '/'+llo+'/'+item+'.cast' |
|
|
|
|
|
|
|
|
|
|
|
var div = document.createElement('asciinema-player'); |
|
|
|
|
|
document.body.appendChild(div); //appending the element |
|
|
|
|
|
var att = document.createAttribute( "src" ); |
|
|
|
|
|
att.value = src ; |
|
|
|
|
|
div.setAttributeNode(att); |
|
|
|
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|
</html> |
|
|
</html> |
|
|