diff --git a/index.js b/index.js index c01bc0b..d0cf5be 100755 --- a/index.js +++ b/index.js @@ -87,7 +87,7 @@ function cat(port) { console.error('The environment variable $BROWSER is not set. Falling back to default opening mechanism.') opn('http://localhost:' + server.address().port, { wait: false }) } else { - console.error('The environment variable $BROWSER is set to "' + $BROWSER + '"') + console.error('The environment variable $BROWSER is set to "' + process.env.BROWSER + '"') child.spawn(process.env.BROWSER, [url], { detached: true }) } }) @@ -133,13 +133,21 @@ function handler(request, response) { var style = 'body { background-color: ' + bg + '; color: ' + fg + '; font-family:Monaco, Menlo, monospace; padding:2em;} ' + 'div#headline { position: fixed; top: 2em; right: 2em ; text-align: right;} ' + - 'div#autoscroll { position: fixed; bottom: 2em; right: 2em ; }' - - - response.write('
' + + 'div#autoscroll { position: fixed; bottom: 2em; right: 2em ; } ' + + '.noselect { ' + + '-webkit-touch-callout: none; /* iOS Safari */ ' + + '-webkit-user-select: none; /* Safari */ ' + + '-khtml-user-select: none; /* Konqueror HTML */ ' + + '-moz-user-select: none; /* Old versions of Firefox */ ' + + '-ms-user-select: none; /* Internet Explorer/Edge */ ' + + 'user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */ }' + + response.write('' + + '' + + '' + '' + - 'started at:' + new Date() + 'started at:' + new Date() + '