App-screenorama
view release on metacpan or search on metacpan
script/screenorama view on Meta::CPAN
$c->send({json => {program => $program, program_args => \@program_args}});
$fork;
}
__DATA__
@@ index.html.ep
<!DOCTYPE html>
<html>
<head>
<title>screenorama - <%= app->config->{program} %> <%= join ' ', @{app->config->{program_args}} %></title>
%= stylesheet begin
body { background: #111; padding: 8px; }
body, .shell { font-size: 13px; font-family: monospace; color: #eee; margin: 0; padding: 0; }
pre { margin: 0; padding: 0; }
.status { border-top: 1px solid #333; margin-top: 20px; }
input { position: absolute; left: -600px; }
% end
%= javascript begin
var termColors = { // from http://flatuicolors.com/
'30': '#000000',
'31': '#c0392b',
'32': '#2ecc71',
script/screenorama view on Meta::CPAN
screenorama.replaceColors = function(match, x, a, b) {
var closing = screenorama.replaceColors.span ? '</span>' : '';
var style = [];
console.log('replaceColors("' + [match, x, a, b].join('", "') + '") == ' + (termColors[b || a] || closing));
screenorama.replaceColors.span = false;
if (!a && typeof b == 'undefined') { return closing; } // regular
if (termColors[b]) style.push('color: ' + termColors[b]);
else if (termColors[a]) style.push('background-color: ' + termColors[a]);
if (a == 1) { style.push('font-weight: bold'); }
else if (a == 4) { style.push('text-decoration: underline'); }
screenorama.replaceColors.span = true;
return closing + '<span style="' + style.join(';') + '">';
};
screenorama.send = function(msg, e) {
if (e) e.preventDefault();
( run in 1.124 second using v1.01-cache-2.11-cpan-f56aa216473 )