mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-16 10:46:59 +00:00
This reverts commit ae96912699.
This commit is contained in:
1 parent
ae96912699
commit
05b047c8b9
1 file changed
+1
-19
@@ -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