App-screenorama
view release on metacpan or search on metacpan
script/screenorama view on Meta::CPAN
$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',
'33': '#f1c40f',
script/screenorama view on Meta::CPAN
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();
console.log(msg);
screenorama.ws.send(msg);
( run in 1.103 second using v1.01-cache-2.11-cpan-5735350b133 )