viewport meta for less terrible mobile experience

This commit is contained in:
ewwwin 2025-05-08 22:57:27 -07:00 committed by GitHub
parent 487022ce15
commit 2cf3964118
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ createServer(async (request, response) => {
response.writeHead(200, { response.writeHead(200, {
'content-type': 'text/html', 'content-type': 'text/html',
}).end( }).end(
`<pre style="white-space:pre-wrap;text-indent:4ch hanging each-line">${ `<meta name=viewport content="width=device-width,initial-scale=1"><pre style="white-space:pre-wrap;text-indent:4ch hanging each-line">${
(await readFile('a.txt', {flag: 'a+', encoding: 'utf8'})) (await readFile('a.txt', {flag: 'a+', encoding: 'utf8'}))
// ugh, fine, i'll html escape it. no xss for you // ugh, fine, i'll html escape it. no xss for you
.replace(/[<>&'"]/g, match => ({ .replace(/[<>&'"]/g, match => ({