mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 16:40:41 +00:00
This reverts commit ae96912699.
This commit is contained in:
@@ -283,7 +283,7 @@ export class PuterHomepageService extends BaseService {
|
||||
},
|
||||
};
|
||||
await eventService.emit('puter.gui.addons', event);
|
||||
let htmlOutput = `<!DOCTYPE html>
|
||||
return `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
@@ -437,24 +437,6 @@ export class PuterHomepageService extends BaseService {
|
||||
</body>
|
||||
|
||||
</html>`;
|
||||
|
||||
// A mostly minimal minifier that minifies minimally
|
||||
// - this is NOT a general-purpose HTML minifier
|
||||
// - it does not account for <pre> tags
|
||||
// - it does not minify javascript code
|
||||
htmlOutput = htmlOutput //...
|
||||
// remove regular HTML comments, but keep conditional comments
|
||||
.replace(/<!--(?!\[if[\s\S]*?]|<!|>)[\s\S]*?-->/g, '')
|
||||
// collapse whitespace between tags
|
||||
.replace(/>\s+</g, '><')
|
||||
// collapse runs of whitespace
|
||||
.replace(/\s+/g, ' ')
|
||||
// remove extra space around = in attributes
|
||||
.replace(/\s*=\s*/g, '=')
|
||||
// remove spaces before tag close
|
||||
.replace(/\s+>/g, '>')
|
||||
.trim();
|
||||
return htmlOutput;
|
||||
};
|
||||
|
||||
generate_error_html ({ message }) {
|
||||
|
||||
Reference in New Issue
Block a user