Use new ClojureScript player

This commit is contained in:
Marcin Kulik 2015-09-19 11:29:26 +00:00
parent ba2cfd17d1
commit 51e14d80a0
11 changed files with 2415 additions and 19900 deletions

View File

@ -1,11 +1,8 @@
//= require rAF
//= require react-0.10.0
//= require asciinema-player
//= require screenfull
function tryCreatePlayer(parentNode, asciicast, options) {
function createPlayer() {
asciinema.CreatePlayer(
asciinema_player.core.CreatePlayer(
parentNode,
asciicast.width, asciicast.height,
asciicast.stdout_frames_url,

View File

@ -1,5 +1,2 @@
//= require asciinema-player
//= require themes/tango
//= require themes/solarized-dark
//= require themes/solarized-light
//= require powerline-symbols

File diff suppressed because one or more lines are too long

View File

@ -1,32 +0,0 @@
// Taken from: https://gist.github.com/1579671
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|| window[vendors[x]+'CancelRequestAnimationFrame'];
}
if (!window.requestAnimationFrame)
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
if (!window.cancelAnimationFrame)
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};
}());

File diff suppressed because it is too large Load Diff

View File

@ -1,143 +0,0 @@
/*!
* screenfull
* v1.1.1 - 2013-11-20
* https://github.com/sindresorhus/screenfull.js
* (c) Sindre Sorhus; MIT License
*/
/*global Element */
(function (window, document) {
'use strict';
var keyboardAllowed = typeof Element !== 'undefined' && 'ALLOW_KEYBOARD_INPUT' in Element, // IE6 throws without typeof check
fn = (function () {
var val, valLength;
var fnMap = [
[
'requestFullscreen',
'exitFullscreen',
'fullscreenElement',
'fullscreenEnabled',
'fullscreenchange',
'fullscreenerror'
],
// new WebKit
[
'webkitRequestFullscreen',
'webkitExitFullscreen',
'webkitFullscreenElement',
'webkitFullscreenEnabled',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
// old WebKit (Safari 5.1)
[
'webkitRequestFullScreen',
'webkitCancelFullScreen',
'webkitCurrentFullScreenElement',
'webkitCancelFullScreen',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
[
'mozRequestFullScreen',
'mozCancelFullScreen',
'mozFullScreenElement',
'mozFullScreenEnabled',
'mozfullscreenchange',
'mozfullscreenerror'
],
[
'msRequestFullscreen',
'msExitFullscreen',
'msFullscreenElement',
'msFullscreenEnabled',
'MSFullscreenChange',
'MSFullscreenError'
]
];
var i = 0;
var l = fnMap.length;
var ret = {};
for (; i < l; i++) {
val = fnMap[i];
if (val && val[1] in document) {
for (i = 0, valLength = val.length; i < valLength; i++) {
ret[fnMap[0][i]] = val[i];
}
return ret;
}
}
return false;
})(),
screenfull = {
request: function (elem) {
var request = fn.requestFullscreen;
elem = elem || document.documentElement;
// Work around Safari 5.1 bug: reports support for
// keyboard in fullscreen even though it doesn't.
// Browser sniffing, since the alternative with
// setTimeout is even worse.
if (/5\.1[\.\d]* Safari/.test(navigator.userAgent)) {
elem[request]();
} else {
elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT);
}
},
exit: function () {
document[fn.exitFullscreen]();
},
toggle: function (elem) {
if (this.isFullscreen) {
this.exit();
} else {
this.request(elem);
}
},
onchange: function () {},
onerror: function () {},
raw: fn
};
if (!fn) {
window.screenfull = false;
return;
}
Object.defineProperties(screenfull, {
isFullscreen: {
get: function () {
return !!document[fn.fullscreenElement];
}
},
element: {
enumerable: true,
get: function () {
return document[fn.fullscreenElement];
}
},
enabled: {
enumerable: true,
get: function () {
// Coerce to boolean in case of old WebKit
return !!document[fn.fullscreenEnabled];
}
}
});
document.addEventListener(fn.fullscreenchange, function (e) {
screenfull.onchange.call(screenfull, e);
});
document.addEventListener(fn.fullscreenerror, function (e) {
screenfull.onerror.call(screenfull, e);
});
window.screenfull = screenfull;
})(window, document);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,35 +0,0 @@
.asciinema-theme-solarized-dark .asciinema-terminal {color: #839496;background-color: #002b36;border-color: #002b36}
.asciinema-theme-solarized-dark .fg-bg {color: #002b36}
.asciinema-theme-solarized-dark .bg-fg {background-color: #839496}
.asciinema-theme-solarized-dark .fg-0 { color: #073642 }
.asciinema-theme-solarized-dark .bg-0 { background-color: #073642 }
.asciinema-theme-solarized-dark .fg-1 { color: #dc322f }
.asciinema-theme-solarized-dark .bg-1 { background-color: #dc322f }
.asciinema-theme-solarized-dark .fg-2 { color: #859900 }
.asciinema-theme-solarized-dark .bg-2 { background-color: #859900 }
.asciinema-theme-solarized-dark .fg-3 { color: #b58900 }
.asciinema-theme-solarized-dark .bg-3 { background-color: #b58900 }
.asciinema-theme-solarized-dark .fg-4 { color: #268bd2 }
.asciinema-theme-solarized-dark .bg-4 { background-color: #268bd2 }
.asciinema-theme-solarized-dark .fg-5 { color: #d33682 }
.asciinema-theme-solarized-dark .bg-5 { background-color: #d33682 }
.asciinema-theme-solarized-dark .fg-6 { color: #2aa198 }
.asciinema-theme-solarized-dark .bg-6 { background-color: #2aa198 }
.asciinema-theme-solarized-dark .fg-7 { color: #eee8d5 }
.asciinema-theme-solarized-dark .bg-7 { background-color: #eee8d5 }
.asciinema-theme-solarized-dark .fg-8 { color: #002b36 }
.asciinema-theme-solarized-dark .bg-8 { background-color: #002b36 }
.asciinema-theme-solarized-dark .fg-9 { color: #cb4b16 }
.asciinema-theme-solarized-dark .bg-9 { background-color: #cb4b16 }
.asciinema-theme-solarized-dark .fg-10 { color: #586e75 }
.asciinema-theme-solarized-dark .bg-10 { background-color: #586e75 }
.asciinema-theme-solarized-dark .fg-11 { color: #657b83 }
.asciinema-theme-solarized-dark .bg-11 { background-color: #657b83 }
.asciinema-theme-solarized-dark .fg-12 { color: #839496 }
.asciinema-theme-solarized-dark .bg-12 { background-color: #839496 }
.asciinema-theme-solarized-dark .fg-13 { color: #6c71c4 }
.asciinema-theme-solarized-dark .bg-13 { background-color: #6c71c4 }
.asciinema-theme-solarized-dark .fg-14 { color: #93a1a1 }
.asciinema-theme-solarized-dark .bg-14 { background-color: #93a1a1 }
.asciinema-theme-solarized-dark .fg-15 { color: #fdf6e3 }
.asciinema-theme-solarized-dark .bg-15 { background-color: #fdf6e3 }

View File

@ -1,35 +0,0 @@
.asciinema-theme-solarized-light .asciinema-terminal {color: #657b83;background-color: #fdf6e3;border-color: #fdf6e3}
.asciinema-theme-solarized-light .fg-bg {color: #fdf6e3}
.asciinema-theme-solarized-light .bg-fg {background-color: #657b83}
.asciinema-theme-solarized-light .fg-0 { color: #eee8d5 }
.asciinema-theme-solarized-light .bg-0 { background-color: #eee8d5 }
.asciinema-theme-solarized-light .fg-1 { color: #dc322f }
.asciinema-theme-solarized-light .bg-1 { background-color: #dc322f }
.asciinema-theme-solarized-light .fg-2 { color: #859900 }
.asciinema-theme-solarized-light .bg-2 { background-color: #859900 }
.asciinema-theme-solarized-light .fg-3 { color: #b58900 }
.asciinema-theme-solarized-light .bg-3 { background-color: #b58900 }
.asciinema-theme-solarized-light .fg-4 { color: #268bd2 }
.asciinema-theme-solarized-light .bg-4 { background-color: #268bd2 }
.asciinema-theme-solarized-light .fg-5 { color: #d33682 }
.asciinema-theme-solarized-light .bg-5 { background-color: #d33682 }
.asciinema-theme-solarized-light .fg-6 { color: #2aa198 }
.asciinema-theme-solarized-light .bg-6 { background-color: #2aa198 }
.asciinema-theme-solarized-light .fg-7 { color: #073642 }
.asciinema-theme-solarized-light .bg-7 { background-color: #073642 }
.asciinema-theme-solarized-light .fg-8 { color: #fdf6e3 }
.asciinema-theme-solarized-light .bg-8 { background-color: #fdf6e3 }
.asciinema-theme-solarized-light .fg-9 { color: #cb4b16 }
.asciinema-theme-solarized-light .bg-9 { background-color: #cb4b16 }
.asciinema-theme-solarized-light .fg-10 { color: #93a1a1 }
.asciinema-theme-solarized-light .bg-10 { background-color: #93a1a1 }
.asciinema-theme-solarized-light .fg-11 { color: #839496 }
.asciinema-theme-solarized-light .bg-11 { background-color: #839496 }
.asciinema-theme-solarized-light .fg-12 { color: #657b83 }
.asciinema-theme-solarized-light .bg-12 { background-color: #657b83 }
.asciinema-theme-solarized-light .fg-13 { color: #6c71c4 }
.asciinema-theme-solarized-light .bg-13 { background-color: #6c71c4 }
.asciinema-theme-solarized-light .fg-14 { color: #586e75 }
.asciinema-theme-solarized-light .bg-14 { background-color: #586e75 }
.asciinema-theme-solarized-light .fg-15 { color: #002b36 }
.asciinema-theme-solarized-light .bg-15 { background-color: #002b36 }

View File

@ -1,35 +0,0 @@
.asciinema-theme-tango .asciinema-terminal {color: #CCCCCC;background-color: #121314;border-color: #121314}
.asciinema-theme-tango .fg-bg {color: #121314}
.asciinema-theme-tango .bg-fg {background-color: #CCCCCC}
.asciinema-theme-tango .fg-0 { color: #000000 }
.asciinema-theme-tango .bg-0 { background-color: #000000 }
.asciinema-theme-tango .fg-1 { color: #CC0000 }
.asciinema-theme-tango .bg-1 { background-color: #CC0000 }
.asciinema-theme-tango .fg-2 { color: #4E9A06 }
.asciinema-theme-tango .bg-2 { background-color: #4E9A06 }
.asciinema-theme-tango .fg-3 { color: #C4A000 }
.asciinema-theme-tango .bg-3 { background-color: #C4A000 }
.asciinema-theme-tango .fg-4 { color: #3465A4 }
.asciinema-theme-tango .bg-4 { background-color: #3465A4 }
.asciinema-theme-tango .fg-5 { color: #75507B }
.asciinema-theme-tango .bg-5 { background-color: #75507B }
.asciinema-theme-tango .fg-6 { color: #06989A }
.asciinema-theme-tango .bg-6 { background-color: #06989A }
.asciinema-theme-tango .fg-7 { color: #D3D7CF }
.asciinema-theme-tango .bg-7 { background-color: #D3D7CF }
.asciinema-theme-tango .fg-8 { color: #555753; font-weight: bold }
.asciinema-theme-tango .bg-8 { background-color: #555753 }
.asciinema-theme-tango .fg-9 { color: #EF2929; font-weight: bold }
.asciinema-theme-tango .bg-9 { background-color: #EF2929 }
.asciinema-theme-tango .fg-10 { color: #8AE234; font-weight: bold }
.asciinema-theme-tango .bg-10 { background-color: #8AE234 }
.asciinema-theme-tango .fg-11 { color: #FCE94F; font-weight: bold }
.asciinema-theme-tango .bg-11 { background-color: #FCE94F }
.asciinema-theme-tango .fg-12 { color: #729FCF; font-weight: bold }
.asciinema-theme-tango .bg-12 { background-color: #729FCF }
.asciinema-theme-tango .fg-13 { color: #AD7FA8; font-weight: bold }
.asciinema-theme-tango .bg-13 { background-color: #AD7FA8 }
.asciinema-theme-tango .fg-14 { color: #34E2E2; font-weight: bold }
.asciinema-theme-tango .bg-14 { background-color: #34E2E2 }
.asciinema-theme-tango .fg-15 { color: #EEEEEC; font-weight: bold }
.asciinema-theme-tango .bg-15 { background-color: #EEEEEC }