From 62606fa9f679d742f8b550770360b7f618be6dc9 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Tue, 28 May 2024 18:33:32 -0500 Subject: [PATCH 01/19] MinifyJS, theming system WIP --- package-lock.json | 327 +++++++++++++++++++++++++++++++++++++++-- package.json | 2 + pageUpdater.js | 23 ++- randomThemer.js | 75 ++++++++++ static/noScript.css | 4 + static/themes/rain.css | 33 +++++ 6 files changed, 440 insertions(+), 24 deletions(-) create mode 100644 randomThemer.js create mode 100644 static/themes/rain.css diff --git a/package-lock.json b/package-lock.json index 974a3de..0531c66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,8 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@node-minify/core": "^8.0.6", + "@node-minify/uglify-js": "^8.0.6", "express": "^4.18.2", "minify-html": "^0.0.2", "ws": "^8.16.0", @@ -23,6 +25,45 @@ "node": ">=14" } }, + "node_modules/@node-minify/core": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@node-minify/core/-/core-8.0.6.tgz", + "integrity": "sha512-/vxN46ieWDLU67CmgbArEvOb41zlYFOkOtr9QW9CnTrBLuTyGgkyNWC2y5+khvRw3Br58p2B5ZVSx/PxCTru6g==", + "license": "MIT", + "dependencies": { + "@node-minify/utils": "8.0.6", + "glob": "9.3.5", + "mkdirp": "1.0.4" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@node-minify/uglify-js": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@node-minify/uglify-js/-/uglify-js-8.0.6.tgz", + "integrity": "sha512-t6NNJwqnCwfFbbYOKv9bY3v43DcEkIUq4aaj4gtElJnx9tQaELiI0vsX9WuvQFrJlRI1xAwiNzYc+U05PWpscw==", + "license": "MIT", + "dependencies": { + "@node-minify/utils": "8.0.6", + "uglify-js": "3.17.4" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@node-minify/utils": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@node-minify/utils/-/utils-8.0.6.tgz", + "integrity": "sha512-csY4qcR7jUwiZmkreNTJhcypQfts2aY2CK+a+rXgXUImZiZiySh0FvwHjRnlqWKvg+y6ae9lHFzDRjBTmqlTIQ==", + "license": "MIT", + "dependencies": { + "gzip-size": "6.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -51,6 +92,12 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, "node_modules/body-parser": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", @@ -74,6 +121,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -100,6 +156,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/clean-css": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", + "license": "MIT", + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 4.0" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -173,6 +241,12 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "license": "MIT" + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -292,6 +366,12 @@ "node": ">= 0.6" } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -318,6 +398,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -329,6 +427,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "license": "MIT", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -423,6 +536,15 @@ "acorn": "^8.8.0" } }, + "node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -483,15 +605,40 @@ "uglify-es": "3.x.x" } }, - "node_modules/minify-html/node_modules/clean-css": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", - "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", + "node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "license": "ISC", "dependencies": { - "source-map": "~0.6.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 4.0" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/ms": { @@ -534,6 +681,31 @@ "node": ">= 0.8" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -753,6 +925,18 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "license": "BSD-2-Clause", + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/undici": { "version": "5.28.4", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", @@ -828,6 +1012,33 @@ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==" }, + "@node-minify/core": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@node-minify/core/-/core-8.0.6.tgz", + "integrity": "sha512-/vxN46ieWDLU67CmgbArEvOb41zlYFOkOtr9QW9CnTrBLuTyGgkyNWC2y5+khvRw3Br58p2B5ZVSx/PxCTru6g==", + "requires": { + "@node-minify/utils": "8.0.6", + "glob": "9.3.5", + "mkdirp": "1.0.4" + } + }, + "@node-minify/uglify-js": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@node-minify/uglify-js/-/uglify-js-8.0.6.tgz", + "integrity": "sha512-t6NNJwqnCwfFbbYOKv9bY3v43DcEkIUq4aaj4gtElJnx9tQaELiI0vsX9WuvQFrJlRI1xAwiNzYc+U05PWpscw==", + "requires": { + "@node-minify/utils": "8.0.6", + "uglify-js": "3.17.4" + } + }, + "@node-minify/utils": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@node-minify/utils/-/utils-8.0.6.tgz", + "integrity": "sha512-csY4qcR7jUwiZmkreNTJhcypQfts2aY2CK+a+rXgXUImZiZiySh0FvwHjRnlqWKvg+y6ae9lHFzDRjBTmqlTIQ==", + "requires": { + "gzip-size": "6.0.0" + } + }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -847,6 +1058,11 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, "body-parser": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", @@ -866,6 +1082,14 @@ "unpipe": "1.0.0" } }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -883,6 +1107,14 @@ "set-function-length": "^1.2.1" } }, + "clean-css": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", + "requires": { + "source-map": "~0.6.0" + } + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -934,6 +1166,11 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1029,6 +1266,11 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -1046,6 +1288,17 @@ "hasown": "^2.0.0" } }, + "glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + } + }, "gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -1054,6 +1307,14 @@ "get-intrinsic": "^1.1.3" } }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "requires": { + "duplexer": "^0.1.2" + } + }, "has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -1118,6 +1379,11 @@ "acorn": "^8.8.0" } }, + "lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1158,18 +1424,26 @@ "requires": { "clean-css": "4.x.x", "uglify-es": "3.x.x" - }, - "dependencies": { - "clean-css": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", - "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", - "requires": { - "source-map": "~0.6.0" - } - } } }, + "minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -1198,6 +1472,22 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" + } + } + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -1358,6 +1648,11 @@ } } }, + "uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==" + }, "undici": { "version": "5.28.4", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", diff --git a/package.json b/package.json index 299ccca..baf3eec 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,8 @@ "author": "Violet ", "license": "MIT", "dependencies": { + "@node-minify/core": "^8.0.6", + "@node-minify/uglify-js": "^8.0.6", "express": "^4.18.2", "minify-html": "^0.0.2", "ws": "^8.16.0", diff --git a/pageUpdater.js b/pageUpdater.js index 49a582c..307175f 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -1,10 +1,11 @@ const path = require('path'), fs = require('fs'), WebSocket = require('ws'), - minify = require('minify-html'), - activityToHTML = require("./overcomplicatedStatuses.js") - - // weatherGenerator = require("./weatherGenerator") + minify = require('@node-minify/core'), + uglifyJs = require("@node-minify/uglify-js"), + htmlMinifier = require("minify-html"), + activityToHTML = require("./overcomplicatedStatuses.js"), + randomThemer = require("./randomThemer.js") var constants = JSON.parse(fs.readFileSync(path.join(__dirname, 'constants.json'))) @@ -109,7 +110,7 @@ function converter(html, query) { "SPINCOUNT": globalSpins, "UPTIME": timeFormatter((Date.now() - uptime) / 1000), "RELOAD_COUNT": reloads, - "WEATHER_MODIFIER": "", + "WEATHER_MODIFIER": randomThemer.returnTheme(), "WEATHER_TEXT": "", "ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")), "CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString() @@ -147,10 +148,10 @@ function converter(html, query) { module.exports = { getActivities: function () { - return minify.minify(activityToHTML.activitiesToHTML(lanyardData, cachedImages)) + return htmlMinifier.minify(activityToHTML.activitiesToHTML(lanyardData, cachedImages)) }, - middleWare: function (req, res, next) { + middleWare: async function (req, res, next) { var filePath = (req.baseUrl + req.path).trim() @@ -176,10 +177,16 @@ module.exports = { if (filePath.includes(".html")) { data = converter(data, req.query) + } if (!filePath.includes(".js")) { - data = minify.minify(data) + data = htmlMinifier.minify(data) + } else { + data = await minify({ + compressor: uglifyJs, + content: data + }) } res.send(data) diff --git a/randomThemer.js b/randomThemer.js new file mode 100644 index 0000000..8431068 --- /dev/null +++ b/randomThemer.js @@ -0,0 +1,75 @@ +function rain() { + var html = "" + + html += `
` + html += `` + + var amount = 7 + + for (let index = 0; index < amount; index++) { + html += `
` + } + html += "" + html += "
" + + return html +} + +function night() { + +} + +var events = [ + rain(), + "", +] + +module.exports = { + + returnTheme: function() { + var time = new Date() + return events[time.getUTCDay() % events.length] + }, + +} \ No newline at end of file diff --git a/static/noScript.css b/static/noScript.css index 63de797..0626463 100644 --- a/static/noScript.css +++ b/static/noScript.css @@ -6,4 +6,8 @@ .noscript { display: initial; +} + +.scriptEnabled { + display: none; } \ No newline at end of file diff --git a/static/themes/rain.css b/static/themes/rain.css new file mode 100644 index 0000000..19fe490 --- /dev/null +++ b/static/themes/rain.css @@ -0,0 +1,33 @@ + +#card { + background-color: rgba(50, 0, 90, 0.5); + backdrop-filter: blur(5px); +} +.rainStuff { + position: sticky; + top: 0; + height: 0; + z-index: -5; +} + +.rainContainer { + height: 100vh; + width: 80vw; + top: 0px; + left: 10vw; + position: absolute; + overflow: hidden; +} + +.rainDrop { + position: absolute; + width: 5px; + backdrop-filter: blur(5px); + background-color: rgba(0, 0, 255, 0.2); + height: 10vh; + visibility: hidden; +} + +body { + background: linear-gradient(rgb(10, 10, 75), black); +} \ No newline at end of file From 9bcaf4de5f8aaf82c1892e2f207a1d1af1119be7 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 21:42:30 -0500 Subject: [PATCH 02/19] Remove gap from statuses, make CSS link non-relative --- overcomplicatedStatuses.js | 19 ++++++++++++++----- randomThemer.js | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 5142ef1..bb097f5 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -37,7 +37,6 @@ function timeFormatter(seconds) { } else { return `${minutes}:${seconds % 60}` } - } function gameTimeFormatter(seconds) { @@ -54,6 +53,14 @@ function gameTimeFormatter(seconds) { } +function onlyIfExists(string, check) { + if (check) { + return string + } else { + return "" + } +} + module.exports = { activitiesToHTML: (lanyardData, cachedImages) => { var debounce = false @@ -140,7 +147,8 @@ module.exports = { } ` - } else if (activity.type == 0) { + } else if (activity.type == 0 && activity.assets) { + console.log(activity.assets) var time = activity.created_at if (activity.timestamps) { time = activity.timestamps.start @@ -163,13 +171,14 @@ module.exports = { ${smch()}

Playing ${activity.name} -
${(activity.details || activity.assets.large_text || " ")} -
${(activity.state || activity.assets.small_text || " ")} + ${onlyIfExists("
" + (activity.details || activity.assets.large_text), activity.details || activity.assets.large_text)} + ${onlyIfExists("
" + (activity.state || activity.assets.small_text), activity.state || activity.assets.small_text)}
${gameTimeFormatter((Date.now() - time) / 1000)}

` - } else if (activity.type != 4) { + } else if (activity.type != 4 && activity.assets) { + console.log(activity.assets) var time = activity.created_at if (activity.timestamps) { time = activity.timestamps.start diff --git a/randomThemer.js b/randomThemer.js index 8431068..2f3e0b4 100644 --- a/randomThemer.js +++ b/randomThemer.js @@ -2,7 +2,7 @@ function rain() { var html = "" html += `
` - html += `` + html += `` var amount = 7 From ec6faac33e36590172a153103f241d4d61943e82 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 21:43:33 -0500 Subject: [PATCH 03/19] Remove debug lines --- overcomplicatedStatuses.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index bb097f5..d777fa0 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -148,7 +148,6 @@ module.exports = { ` } else if (activity.type == 0 && activity.assets) { - console.log(activity.assets) var time = activity.created_at if (activity.timestamps) { time = activity.timestamps.start @@ -178,7 +177,6 @@ module.exports = {
` } else if (activity.type != 4 && activity.assets) { - console.log(activity.assets) var time = activity.created_at if (activity.timestamps) { time = activity.timestamps.start From 633076e52aa9893b6c21303d52856a3b07c37833 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 21:44:24 -0500 Subject: [PATCH 04/19] Fix Activities not changing with size on socials page --- static/root.css | 16 ---------------- static/style.css | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/static/root.css b/static/root.css index 8b72731..91b31a5 100644 --- a/static/root.css +++ b/static/root.css @@ -71,22 +71,6 @@ img:not(.project-inner > div > img):not(.activity>img) { transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1); } -@media screen and (min-width: 850px) { - .activity-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - } - - .activity { - flex: 0 0 49%; - margin: auto; - padding: 0; - margin: 0; - align-content: center; - } -} - @keyframes spinny { 0% { rotate: 0deg; diff --git a/static/style.css b/static/style.css index cf8bc82..68debf6 100644 --- a/static/style.css +++ b/static/style.css @@ -168,6 +168,21 @@ h2 { text-decoration-color: white; } +@media screen and (min-width: 850px) { + .activity-container { + display: flex; + flex-wrap: wrap; + justify-content: center; + } + + .activity { + flex: 0 0 49%; + margin: auto; + padding: 0; + margin: 0; + align-content: center; + } +} .activity { From 7b9281057ca46244090a3935a33941aacfd130fb Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 21:50:08 -0500 Subject: [PATCH 05/19] Change "Artist" to "Artists" depending on song, Remove Album if too long. --- overcomplicatedStatuses.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index d777fa0..2b5dfed 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -103,13 +103,17 @@ module.exports = { function songStats() { var html = `` - if (activity.assets && activity.assets.large_text != activity.details) { + if (activity.assets && activity.assets.large_text != activity.details && activity.state.length + activity.assets.large_text.length < 100) { html += `
Album: ${activity.assets.large_text || " "}
Artist: ${activity.state || " "} ` } else { - html += `
Artist: ${activity.state || " "}` + html += "
" + if (activity.state.includes(";")) + { html += "Artists: " } + else { html += "Artist: " } + html += `${activity.state || " "}` } return html From 633c7fc5233a6188f324d49eeb8fa0b090bcd87d Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 21:59:08 -0500 Subject: [PATCH 06/19] Tiny gaps for readability --- overcomplicatedStatuses.js | 2 +- static/style.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 2b5dfed..b94d546 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -125,7 +125,7 @@ module.exports = {

- Listening to ${activity.name} + Listening to${activity.name}
Song: ${activity.details || " "} ${songStats()}
diff --git a/static/style.css b/static/style.css index 68debf6..26d9e9b 100644 --- a/static/style.css +++ b/static/style.css @@ -168,6 +168,11 @@ h2 { text-decoration-color: white; } +br { + display: block; + margin: 3px 0; +} + @media screen and (min-width: 850px) { .activity-container { display: flex; From 726dc3a439d85bcd0caac4f81e4d30a9e5047207 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 22:31:16 -0500 Subject: [PATCH 07/19] Bold text --- assets/fonts/rubik-v28-latin-600.woff2 | Bin 0 -> 19096 bytes static/style.css | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 assets/fonts/rubik-v28-latin-600.woff2 diff --git a/assets/fonts/rubik-v28-latin-600.woff2 b/assets/fonts/rubik-v28-latin-600.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b1afae725195a9550391f09c60832b3e2d5d8e52 GIT binary patch literal 19096 zcmXT-cQayOWME)m@S4FO0HXIKFfe!-L&QLQR4mnKC;i<@rZb5x!9F;|F~o(TrA&~6 ztMP0>awz?ob|f>Ac0JIkUg#YTOR4WBjq zZp>wu?lgFryeIYle@V`)6B6fdG5VxOrB+DDIcB&`a$TS0l`%>A^_FdYx2$(v-?r$t zR`!?PIH9La-Q0RRWa?rrop4*&o%lf_QttGr3$<1f`WZ17b}L=X{jssdeSW3Aa`vtF z`6|zBuASfc^q2K{hjkn$Cs;3!VA*lm`BZ`W#qYmuZx)}6X80$aHpN4$>U4WZ%#~^V z-F~&=tu^h-U;Zf<-`j0gtWEna8SqWfx32w&ik z&)|~rnLj-=?zSn*QUP<`K+OZ2Z1?QXd|$th&B`?7ox-BFDAr!ZypO3nqsx}9da=i^ zI)0jA@ICo!JjvS>4^KKOYZ?4i(fhVU?Jla+JE(R&{d?T=uc80?PQ3hj zM{=>7q-s*$dE+)kk><6roP07m9RI&o&%GxT6`eJ4>0U>T0*~o?=AT+xel;|N?O_2& z_n`;@y=Es5ljbiUKK$DfSF@$aOa4I7Wp=)V{mySn=M;TS(XE?xKk(1)%V#fXz2~tJ z;f-Nk(Be<(6x-IQoi|GU>gW5Z-%l=2nzPY~tYi4QV?a7|v zmn4@upKjUY#BueMhNP$D<~eiAqa(UY5;XlVh&9 z;rb4-sk*&F8*FQT8853ldi7^Ogn2G&E^kmTWj>Tzx!_ME<7`d~ z&JAJ?2O4S_P9H2-=)l9UNiU|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l|*l}(=rpD7e<49aZv}Vr7R?Ccz2$`FcJ0d3??kku+M?@rK zaftWBGlI+YYoD%2?z2wZZhOwMpJ8dsjO=YcpG79LX{|q7BBrUgdCjTbcjEbTRg~4Y z#`NaKR8Dy8n|0|?w|yhanS$V;8T3h}wsPj2k!^3LJP|7&A0{vsB7Rr1+vXIIQL*_?Lq z(N>nTQK_@nU*B!2yr0dp;c1JvzrG%0N-+=b!57i7@(kr0(@PmnE9%^FiHtto@nG!} z#)=r$L%sp0UH&Y)^n1d=LY=8q;y*Tv<#Kqd*-aLz>d7^Uh->Q2_6-$xl~TX<<=XYw zivmH$88Q9SzVt{0AMfXwDSf%;<7HpYK<%$wUpDIeO1+`9SL_hKvYX7cj_}x~y7=qH zA;zKY7vDbIcP8HY+T7=#mMj-L^6gs5&SPI*@XqP{`c`_IEobe5`UCnb3=9ka4UQrE literal 0 HcmV?d00001 diff --git a/static/style.css b/static/style.css index 26d9e9b..fdab342 100644 --- a/static/style.css +++ b/static/style.css @@ -9,6 +9,14 @@ color-scheme: dark; } +@font-face { + font-display: swap; + font-family: 'RubikBold'; + font-style: bold; + font-weight: 600; + src: url('./fonts/rubik-v28-latin-600.woff2') format('woff2'); +} + @font-face { font-display: swap; font-family: 'Rubik'; @@ -317,4 +325,12 @@ sup { em, b, s { color: inherit; +} + +b, b > *, .activityTitle, .activityTitle > * { + font-family: "RubikBold", Verdana, Geneva, Tahoma, sans-serif; +} + +.activityTitle { + text-decoration: underline; } \ No newline at end of file From 6cf0541b727c7ab701146e7a10653b31cdc8ff0b Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 30 May 2024 22:32:30 -0500 Subject: [PATCH 08/19] Add space --- overcomplicatedStatuses.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index b94d546..c62a9d7 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -125,7 +125,7 @@ module.exports = {

- Listening to${activity.name} + Listening to ${activity.name}
Song: ${activity.details || " "} ${songStats()}
From 221b63b7cfd8d57c166c5860dcad068024f00edc Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 31 May 2024 01:05:50 -0500 Subject: [PATCH 09/19] New highlighting system --- output.json | 2153 +++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 12 + package.json | 1 + pageUpdater.js | 140 ++- 4 files changed, 2263 insertions(+), 43 deletions(-) create mode 100644 output.json diff --git a/output.json b/output.json new file mode 100644 index 0000000..05ae4e9 --- /dev/null +++ b/output.json @@ -0,0 +1,2153 @@ +[ + { + "type": "element", + "tagName": "!doctype", + "attributes": [ + { + "key": "html", + "value": null + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "html", + "attributes": [ + { + "key": "lang", + "value": "en" + } + ], + "children": [ + { + "type": "element", + "tagName": "head", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "link", + "attributes": [ + { + "key": "rel", + "value": "stylesheet" + }, + { + "key": "type", + "value": "text/css" + }, + { + "key": "href", + "value": "./style.css" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "link", + "attributes": [ + { + "key": "rel", + "value": "stylesheet" + }, + { + "key": "type", + "value": "text/css" + }, + { + "key": "href", + "value": "./root.css" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "noscript", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "link", + "attributes": [ + { + "key": "rel", + "value": "stylesheet" + }, + { + "key": "href", + "value": "./noScript.css" + } + ], + "children": [] + } + ] + }, + { + "type": "element", + "tagName": "script", + "attributes": [ + { + "key": "src", + "value": "./main.js" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "charset", + "value": "UTF-8" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "name", + "value": "viewport" + }, + { + "key": "content", + "value": "width=device-width, initial-scale=1.0" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "title", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Violet's Purgatory" + } + ] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "name", + "value": "darkreader-lock" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "content", + "value": "Violet's Purgatory" + }, + { + "key": "property", + "value": "og:title" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "content", + "value": "Hi, I'm Violet, a 15 year old web & game developer. My site has info about me, so please visit!" + }, + { + "key": "property", + "value": "og:description" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "content", + "value": "https://api.violets-purgatory.dev/v1/pfp" + }, + { + "key": "property", + "value": "og:image" + } + ], + "children": [] + }, + { + "type": "element", + "tagName": "meta", + "attributes": [ + { + "key": "content", + "value": "#a200ff" + }, + { + "key": "data-react-helmet", + "value": "true" + }, + { + "key": "name", + "value": "theme-color" + } + ], + "children": [] + } + ] + }, + { + "type": "element", + "tagName": "body", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "h1", + "attributes": [ + { + "key": "class", + "value": "animatedTitle" + } + ], + "children": [ + { + "type": "text", + "content": "Welcome to " + }, + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "class", + "value": "mainTitle" + } + ], + "children": [ + { + "type": "text", + "content": "Violet's Purgatory" + } + ] + }, + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "class", + "value": "note" + } + ], + "children": [ + { + "type": "text", + "content": "Commit 511" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "main", + "attributes": [ + { + "key": "class", + "value": "animatedMain" + } + ], + "children": [ + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Make sure to check out this project on " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "href", + "value": "https://git.violets-purgatory.dev/bingus_violet/violets-purgatory" + } + ], + "children": [ + { + "type": "text", + "content": "Forgejo" + } + ] + }, + { + "type": "text", + "content": "!" + } + ] + }, + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "id", + "value": "card" + } + ], + "children": [ + { + "type": "element", + "tagName": "h2", + "attributes": [], + "children": [ + { + "type": "text", + "content": "{Violet}" + } + ] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "style", + "value": "display:flex;justify-content:center;align-items:center" + } + ], + "children": [ + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "style", + "value": "width:50%" + } + ], + "children": [ + { + "type": "element", + "tagName": "img", + "attributes": [ + { + "key": "draggable", + "value": "false" + }, + { + "key": "src", + "value": "https://api.violets-purgatory.dev/v1/pfp" + }, + { + "key": "class", + "value": "pfp" + } + ], + "children": [] + } + ] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "style", + "value": "width:50%" + } + ], + "children": [ + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "style", + "value": "float:left" + } + ], + "children": [ + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "They/Them" + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Developer" + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "style", + "value": "color: rgb(100, 255, 100);" + }, + { + "key": "class", + "value": "statusColor" + } + ], + "children": [ + { + "type": "text", + "content": "Online" + } + ] + }, + { + "type": "element", + "tagName": "style", + "attributes": [], + "children": [ + { + "type": "text", + "content": ".pfp { border-color: rgb(100, 255, 100) }" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [ + { + "key": "class", + "value": "noscript" + } + ], + "children": [ + { + "type": "text", + "content": "Violet has been spun 17 times!" + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [ + { + "key": "class", + "value": "spinnyCount" + }, + { + "key": "style", + "value": "display:none" + } + ], + "children": [ + { + "type": "text", + "content": "You have spun Violet " + }, + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "class", + "value": "localSpins" + } + ], + "children": [ + { + "type": "text", + "content": "4" + } + ] + }, + { + "type": "text", + "content": " times!" + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "Everyone has spun Violet " + }, + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "class", + "value": "globalSpins" + } + ], + "children": [ + { + "type": "text", + "content": "17" + } + ] + }, + { + "type": "text", + "content": " times!" + } + ] + }, + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "div", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "p", + "attributes": [ + { + "key": "style", + "value": "padding:10px" + } + ], + "children": [ + { + "type": "text", + "content": "Hi! I'm Violet, a 15 year old web and game developer. I make server-sided dynamic websites, with no Javascript required! I'm currently making games in the Godot Engine, and my dynamic sites in NodeJS." + } + ] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "linkContainer" + } + ], + "children": [ + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "./socials/" + } + ], + "children": [ + { + "type": "text", + "content": "Socials" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://blog.violets-purgatory.dev" + } + ], + "children": [ + { + "type": "text", + "content": "Blog" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "./faq" + } + ], + "children": [ + { + "type": "text", + "content": "Nerd FAQ" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://{BRANCH_SUB}violets-purgatory.dev" + } + ], + "children": [ + { + "type": "text", + "content": "Beta site" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://fs.violets-purgatory.dev" + } + ], + "children": [ + { + "type": "text", + "content": "FileShare" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "customStatus" + } + ], + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "World's Worst Developer" + } + ] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "id", + "value": "activityHtml" + } + ], + "children": [ + { + "type": "element", + "tagName": "h2", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "What I'm up to:" + } + ] + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "activity-container" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "chip activity grid-child" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "img", + "attributes": [ + { + "key": "src", + "value": "/cached/24681403300.png" + }, + { + "key": "title", + "value": "TOHO BOSSA NOVA 2" + } + ], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n Listening to Spotify\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": " Song: タイニーリトル・アジアンタム\n \n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": " Album: TOHO BOSSA NOVA 2\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": " Artist: ShibayanRecords\n \n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "class", + "value": "lengthBar lengthBar0" + } + ], + "children": [ + { + "type": "element", + "tagName": "span", + "attributes": [], + "children": [] + } + ] + }, + { + "type": "text", + "content": "\n 5:51\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "style", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n \n .lengthBar0 > span {\n animation-name: songSlider0;\n animation-duration: 261s;\n animation-timing-function: linear;\n }\n \n @keyframes songSlider0 {\n 0% {\n width: 25.66894586894587%;\n }\n 100% {\n width: 100%;\n }\n }\n " + } + ] + }, + { + "type": "text", + "content": "\n \n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "chip activity grid-child" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "img", + "attributes": [ + { + "key": "src", + "value": "/cached/28034009225.png" + }, + { + "key": "title", + "value": "Editing a JS file" + } + ], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "img", + "attributes": [ + { + "key": "class", + "value": "smallimg" + }, + { + "key": "src", + "value": "/cached/5034082571.png" + }, + { + "key": "title", + "value": "VSCodium" + } + ], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n Playing " + }, + { + "type": "element", + "tagName": "span", + "attributes": [ + { + "key": "style", + "value": "color: rgb(255, 100, 150);" + } + ], + "children": [ + { + "type": "text", + "content": "Code" + } + ] + }, + { + "type": "text", + "content": " \n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "In Violets-Purgatory - 0 problems found\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "Working on pageUpdater.js:169:62\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": " 3 hours and 33 minutes\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + } + ] + }, + { + "type": "comment", + "content": "


Announcement!

\n

Blah blah blah blah...

" + }, + { + "type": "element", + "tagName": "h2", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "Services" + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "List of services for public use hosted on Violet's Purgatory." + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "href", + "value": "https://sxng.violets-purgatory.dev" + }, + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "SearXNG: sxng.violets-purgatory.dev" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "Matrix: matrix.violets-purgatory.dev" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "href", + "value": "https://element.violets-purgatory.dev" + }, + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "Element: element.violets-purgatory.dev" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "href", + "value": "https://git.violets-purgatory.dev" + }, + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "Forgejo: git.violets-purgatory.dev (contact me for an account)" + } + ] + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "Thumbor: thumbor.violets-purgatory.dev" + } + ] + }, + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "h1", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Socials" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Here's most of the sites you can find me on-" + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "if you needed that for some reason?" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "grid-container" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "grid-child" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h3", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Social Media" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://floofy.city/@bingus_violet" + }, + { + "key": "rel", + "value": "me" + } + ], + "children": [ + { + "type": "text", + "content": "Fedi: bingus_violet​@floofy.city" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://www.youtube.com/channel/UChcrBJNJLZucy3TPyGyAY2g" + } + ], + "children": [ + { + "type": "text", + "content": "Youtube: {Violet}'s Fiasco" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://ko-fi.com/bingus_violet" + } + ], + "children": [ + { + "type": "text", + "content": "Ko-fi: Bingus_{Violet}" + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "grid-child" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h3", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Chat" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://matrix.to/#/@bingus_violet:matrix.violets-purgatory.dev" + } + ], + "children": [ + { + "type": "text", + "content": "Matrix: @bingus_violet:​matrix.violets-purgatory.dev" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "Discord: bingus_violet" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + } + ], + "children": [ + { + "type": "text", + "content": "Revolt: Bingus{Violet}#5573" + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "grid-child" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h3", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Coding" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://git.violets-purgatory.dev/bingus_violet/" + } + ], + "children": [ + { + "type": "text", + "content": "Forgejo: bingus_violet (git.violets-purgatory.dev)" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://codeberg.org/Bingus_violet" + } + ], + "children": [ + { + "type": "text", + "content": "Codeberg: bingus_violet" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://hub.docker.com/u/bingusviolet" + } + ], + "children": [ + { + "type": "text", + "content": "Docker: bingusviolet" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://github.com/violets-puragtory" + } + ], + "children": [ + { + "type": "text", + "content": "Github: violets-puragtory" + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [ + { + "key": "class", + "value": "grid-child" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "div", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h3", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Games" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "a", + "attributes": [ + { + "key": "class", + "value": "chip" + }, + { + "key": "href", + "value": "https://steamcommunity.com/id/violet-The-Thigh-high-obtainer/" + } + ], + "children": [ + { + "type": "text", + "content": "Steam: {Violet}" + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "h1", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "FAQ" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h3", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Why are so many words colored?" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "I like the way it looks to have certain words be highlighted, makes it look fancier and easier to read (imo). So, when I remade this site, I went ahead and added an " + }, + { + "type": "element", + "tagName": "em", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Automatic Word Highlighting System!" + } + ] + }, + { + "type": "text", + "content": " This allows me have words automatically highlighted, on the server side, without having to do it in the code manually. Here's the current list of highlighted words:" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [ + { + "key": "class", + "value": "textBlock" + } + ], + "children": [ + { + "type": "text", + "content": "birds, Pissing, Starwalker, word highlighting, replaceAll, Godot Engine, Javascript, NodeJS, Violet's, Violet, Asahi, Lunya, bisexual, enby, Purgatory, Youtube, Fedi, Matrix, Element, Codeberg, Docker, Github, Steam, Univerter, Ko-fi, Revolt, Discord, SearXNG, Highlighting, highlighted, Forgejo, HTML, CSS, Thumbor" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h3", + "attributes": [], + "children": [ + { + "type": "text", + "content": "I thought the site doesn't use Javascript? So why is it there?" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Originally, all my sites were completely Javascript free. As of late, though, I decided to add Javascript to this one. Javascript will " + }, + { + "type": "element", + "tagName": "b", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "em", + "attributes": [], + "children": [ + { + "type": "text", + "content": "NEVER" + } + ] + } + ] + }, + { + "type": "text", + "content": " be a requirement on this site. Javascript will ONLY be used where nessacary, and I will do everything possible to make the experience indistinguishable." + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h2", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "Random video!" + } + ] + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [ + { + "type": "text", + "content": "I would call it random " + }, + { + "type": "element", + "tagName": "em", + "attributes": [], + "children": [ + { + "type": "text", + "content": "daily" + } + ] + }, + { + "type": "text", + "content": " video but its not at all daily..." + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": " \n " + }, + { + "type": "element", + "tagName": "video", + "attributes": [ + { + "key": "controls", + "value": "true" + }, + { + "key": "src", + "value": "https://fs.violets-purgatory.dev/Clips/Deep%20Rock%20Galactic/Teamwork.mp4" + } + ], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "h1", + "attributes": [], + "children": [ + { + "type": "element", + "tagName": "hr", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "Stats" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "ul", + "attributes": [], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "li", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Page generation time: {LOAD_TIME}" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "li", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Uptime: about 1 seconds" + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "li", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Total reloads: 1 " + }, + { + "type": "element", + "tagName": "sup", + "attributes": [], + "children": [ + { + "type": "text", + "content": "*1" + } + ] + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "li", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Cached Images: 3 " + }, + { + "type": "element", + "tagName": "sup", + "attributes": [], + "children": [ + { + "type": "text", + "content": "*2" + } + ] + } + ] + }, + { + "type": "text", + "content": "\n " + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "ol", + "attributes": [ + { + "key": "class", + "value": "noteList" + } + ], + "children": [ + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "li", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Increments by 1 " + }, + { + "type": "element", + "tagName": "em", + "attributes": [], + "children": [ + { + "type": "text", + "content": "EVERY" + } + ] + }, + { + "type": "text", + "content": " time " + }, + { + "type": "element", + "tagName": "em", + "attributes": [], + "children": [ + { + "type": "text", + "content": "ANY" + } + ] + }, + { + "type": "text", + "content": " page is loaded." + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "li", + "attributes": [], + "children": [ + { + "type": "text", + "content": "Cached Images are cleared on server restart." + } + ] + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "text", + "content": "\n " + }, + { + "type": "element", + "tagName": "p", + "attributes": [], + "children": [] + }, + { + "type": "element", + "tagName": "br", + "attributes": [], + "children": [] + } + ] + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0531c66..4a561cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@node-minify/core": "^8.0.6", "@node-minify/uglify-js": "^8.0.6", "express": "^4.18.2", + "himalaya": "^1.1.0", "minify-html": "^0.0.2", "ws": "^8.16.0", "youtubei.js": "^9.0.2" @@ -486,6 +487,12 @@ "node": ">= 0.4" } }, + "node_modules/himalaya": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/himalaya/-/himalaya-1.1.0.tgz", + "integrity": "sha512-LLase1dHCRMel68/HZTFft0N0wti0epHr3nNY7ynpLbyZpmrKMQ8YIpiOV77TM97cNpC8Wb2n6f66IRggwdWPw==", + "license": "ISC" + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -1341,6 +1348,11 @@ "function-bind": "^1.1.2" } }, + "himalaya": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/himalaya/-/himalaya-1.1.0.tgz", + "integrity": "sha512-LLase1dHCRMel68/HZTFft0N0wti0epHr3nNY7ynpLbyZpmrKMQ8YIpiOV77TM97cNpC8Wb2n6f66IRggwdWPw==" + }, "http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", diff --git a/package.json b/package.json index baf3eec..a1003e7 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@node-minify/core": "^8.0.6", "@node-minify/uglify-js": "^8.0.6", "express": "^4.18.2", + "himalaya": "^1.1.0", "minify-html": "^0.0.2", "ws": "^8.16.0", "youtubei.js": "^9.0.2" diff --git a/pageUpdater.js b/pageUpdater.js index 307175f..cac4d52 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -5,7 +5,8 @@ const path = require('path'), uglifyJs = require("@node-minify/uglify-js"), htmlMinifier = require("minify-html"), activityToHTML = require("./overcomplicatedStatuses.js"), - randomThemer = require("./randomThemer.js") + randomThemer = require("./randomThemer.js"), + himalaya = require("himalaya") var constants = JSON.parse(fs.readFileSync(path.join(__dirname, 'constants.json'))) @@ -44,31 +45,22 @@ function timeFormatter(seconds) { } -function converter(html, query) { +function converter(html) { var startTime = Date.now() - + + html = htmlMinifier.minify(html) + var config = JSON.parse(fs.readFileSync(path.join(__dirname, 'config/config.json'))) reloads += 1 - while (html.includes("{PATH_")) { - var pagePath = html.substring(html.indexOf("{PATH_")) - pagePath = pagePath.substring(6, pagePath.indexOf('}')) - - var stringIndex = `{PATH_${pagePath}}` - pagePath = pagePath.toLowerCase() - - var pageHTML = fs.readFileSync(path.join(__dirname, 'static', pagePath, 'index.html')).toString() - pageHTML = pageHTML.substring(pageHTML.indexOf('
') + 6, pageHTML.indexOf('
')) - html = html.replace(stringIndex, pageHTML) - } var statusText = "" - + if (lanyardData) { var statusData = constants.discStatuses[lanyardData.discord_status] var username = lanyardData.discord_user.username if (lanyardData.activities[0] && lanyardData.activities[0].type == 4) { - var statusText = `

${lanyardData.activities[0].state}

` + var statusText = `

${lanyardData.activities[0].state}

` } } else { var statusData = constants.discStatuses.offline @@ -92,18 +84,18 @@ function converter(html, query) { "COMMIT_COUNT": commitCount, "QUOTE_COUNT": quotes.length, "RANDOM_TITLE": titles[Math.floor(Math.random() * titles.length)], - "DISCORD_STATUS": - `${statusData.text}` + - ``, + "DISCORD_STATUS": + `${statusData.text}` + + ``, "UPTIME": uptime, "TOPBAR": ``, "DISCORD_USER": username, "CUSTOM_STATUS": statusText, "SELECTED_VIDEO": () => { if (config.dailyVideoURL) { - return `


Random video!

I would call it random daily video but its not at all daily...

-
- ` + return `


Random video!

I would call it random daily video but its not at all daily...

+
+ ` } return `` }, @@ -113,33 +105,95 @@ function converter(html, query) { "WEATHER_MODIFIER": randomThemer.returnTheme(), "WEATHER_TEXT": "", "ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")), - "CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString() + "CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString(), + "ACTIVITIES": activityToHTML.activitiesToHTML(lanyardData, cachedImages) } - + replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " - var rpTable = Object.keys(replacers) + var parsedHTML = himalaya.parse(html) - for (let index = 0; index < rpTable.length; index++) { - const text = rpTable[index]; - html = html.replaceAll(`{${text}}`, replacers[text]) + function scanParsedHTML(json) { + for (var i = 0; i < json.length; i++) { + var element = json[i] + if (element.type == "element") { + if (element.children.length > 0) { + element.children = scanParsedHTML(element.children) + } + } else if (element.type == "text") { + + while (element.content.includes("{PATH_")) { + var pagePath = element.content.substring(element.content.indexOf("{PATH_")) + pagePath = pagePath.substring(6, pagePath.indexOf('}')) + + var stringIndex = `{PATH_${pagePath}}` + pagePath = pagePath.toLowerCase() + + var pageHTML = fs.readFileSync(path.join(__dirname, 'static', pagePath, 'index.html')).toString() + pageHTML = pageHTML.substring(pageHTML.indexOf('
') + 6, pageHTML.indexOf('
')) + element.content = element.content.replaceAll(stringIndex, pageHTML) + } + + var rpTable = Object.keys(replacers) + + for (let index = 0; index < rpTable.length; index++) { + const text = rpTable[index]; + element.content = element.content.replaceAll(`{${text}}`, replacers[text]) + } + + // console.log(element.content, himalaya.parse(element.content)) + + json[i] = element + } + } + + return json } - var bodyHTML = html.substring(html.indexOf("") + 6, html.lastIndexOf("")) - var highTable = Object.keys(highlightedWords) + // var highTable = Object.keys(highlightedWords) - for (let index = 0; index < highTable.length; index++) { - var term = highTable[index]; - var replacement = `${term}` - - bodyHTML = bodyHTML.replaceAll(`{${term}}`, "TEMPORARY_REPLACE") - bodyHTML = bodyHTML.replaceAll(term, replacement) - bodyHTML = bodyHTML.replaceAll("TEMPORARY_REPLACE", `${term}`) + // for (let index = 0; index < highTable.length; index++) { + // var term = highTable[index]; + // var replacement = `${term}` + + + // element.content = element.content.replaceAll(`{${term}}`, "TEMPORARY_REPLACE") + // element.content = element.content.replaceAll(term, replacement) + // element.content = element.content.replaceAll("TEMPORARY_REPLACE", `${term}`) + // } + + parsedHTML = scanParsedHTML(parsedHTML) + + parsedHTML = himalaya.parse(himalaya.stringify(parsedHTML)) + + function highlighter(json) { + for (var i = 0; i < json.length; i++) { + var element = json[i] + if (element.type == "element") { + if (element.children.length > 0) { + element.children = highlighter(element.children) + } + } else if (element.type == "text") { + var highTable = Object.keys(highlightedWords) + + for (let index = 0; index < highTable.length; index++) { + var term = highTable[index]; + var replacement = `${term}` + + + element.content = element.content.replaceAll(`{${term}}`, "TEMPORARY_REPLACE") + element.content = element.content.replaceAll(term, replacement) + element.content = element.content.replaceAll("TEMPORARY_REPLACE", `${term}`) + } + } + } + + return json } - bodyHTML = bodyHTML.replaceAll("{ACTIVITIES}", activityToHTML.activitiesToHTML(lanyardData, cachedImages)) + parsedHTML = highlighter(parsedHTML) - html = html.substring(0, html.indexOf("")) + bodyHTML + html.substring(html.indexOf("") + 7) + html = himalaya.stringify(parsedHTML) html = html.replaceAll("{LOAD_TIME}", (Date.now() - startTime).toString() + "ms") @@ -166,7 +220,7 @@ module.exports = { filePath = path.join(__dirname, 'static', filePath || 'index.html') if (fs.existsSync(filePath)) { var data = fs.readFileSync(filePath).toString() - + res.contentType(path.basename(filePath)) // if (req.path.includes(".css")) { @@ -177,7 +231,7 @@ module.exports = { if (filePath.includes(".html")) { data = converter(data, req.query) - + } if (!filePath.includes(".js")) { @@ -206,7 +260,7 @@ async function updateCommits() { commits = commits.substring(commits.lastIndexOf("") + 3, commits.lastIndexOf("")) // ^ this works for Forgejo (basically everything i use that isnt Github E.G. Codeberg) - + // commits = commits.substring(commits.lastIndexOf(">") + 1) // ^ This works for Github (fuck you Github) @@ -253,7 +307,7 @@ function get_img_url(activity, size = "large_image") { function socketeer() { var lanyard = new WebSocket('https://api.violets-purgatory.dev') - lanyard.on("error", (error) =>{ + lanyard.on("error", (error) => { console.log(error) }) From 52f308e04465fc65655d7d54394db42bf00c5f2c Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 31 May 2024 01:16:50 -0500 Subject: [PATCH 10/19] Only check the body --- pageUpdater.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pageUpdater.js b/pageUpdater.js index cac4d52..111fa50 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -48,10 +48,9 @@ function timeFormatter(seconds) { function converter(html) { var startTime = Date.now() - html = htmlMinifier.minify(html) + html = html var config = JSON.parse(fs.readFileSync(path.join(__dirname, 'config/config.json'))) - reloads += 1 var statusText = "" @@ -110,8 +109,10 @@ function converter(html) { } replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " + + var bodyHTML = htmlMinifier.minify(html.substring(html.indexOf("") + 6, html.lastIndexOf(""))) - var parsedHTML = himalaya.parse(html) + var parsedHTML = himalaya.parse(bodyHTML) function scanParsedHTML(json) { for (var i = 0; i < json.length; i++) { @@ -193,7 +194,9 @@ function converter(html) { parsedHTML = highlighter(parsedHTML) - html = himalaya.stringify(parsedHTML) + parsedHTML = himalaya.stringify(parsedHTML) + + html = html.substring(0, html.indexOf("")) + parsedHTML + html.substring(html.indexOf("") + 7) html = html.replaceAll("{LOAD_TIME}", (Date.now() - startTime).toString() + "ms") From afcc9a4e2d71caedf884f93b2c462033073b10ff Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 31 May 2024 01:22:43 -0500 Subject: [PATCH 11/19] More constants! --- constants.json | 9 +++++++-- overcomplicatedStatuses.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/constants.json b/constants.json index e1f0b65..e9d097e 100644 --- a/constants.json +++ b/constants.json @@ -54,13 +54,15 @@ "Godot Engine": "#64B5F6", "Javascript": "yellow", "NodeJS": "limegreen", + "Violets-Purgatory": "rgb(200, 150, 255)", "Violet's": "rgb(200, 150, 255)", + "Violets": "rgb(200, 150, 255)", "Violet": "rgb(200, 150, 255)", + "Purgatory": "rgb(200, 150, 255)", "Asahi": "rgb(255, 175, 175)", "Lunya": "rgb(255, 175, 175)", "bisexual": "rgb(214, 2, 112)", "enby": "rgb(252, 244, 52)", - "Purgatory": "rgb(200, 150, 255)", "Youtube": "rgb(255, 0, 0)", "Fedi": "rgb(175, 125, 200)", "Matrix": "limegreen", @@ -79,6 +81,9 @@ "Forgejo": "orange", "HTML": "orange", "CSS": "rgb(50, 200, 255)", - "Thumbor": "rgb(225, 225, 255)" + "Thumbor": "rgb(225, 225, 255)", + "Spotify": "limegreen", + "Ultrakill": "red", + "Code": "rgb(150, 175, 255)" } } \ No newline at end of file diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index c62a9d7..08e6e80 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -173,7 +173,7 @@ module.exports = { ${smch()}

- Playing ${activity.name} + Playing ${activity.name} ${onlyIfExists("
" + (activity.details || activity.assets.large_text), activity.details || activity.assets.large_text)} ${onlyIfExists("
" + (activity.state || activity.assets.small_text), activity.state || activity.assets.small_text)}
${gameTimeFormatter((Date.now() - time) / 1000)} From 9ea5be1777f7140f10c8afcc75931025e1045d27 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 31 May 2024 01:28:48 -0500 Subject: [PATCH 12/19] Only check body if body actually exists, apply conversions to Rich Presence --- pageUpdater.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pageUpdater.js b/pageUpdater.js index 111fa50..1fc99c8 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -110,9 +110,12 @@ function converter(html) { replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " - var bodyHTML = htmlMinifier.minify(html.substring(html.indexOf("") + 6, html.lastIndexOf(""))) - - var parsedHTML = himalaya.parse(bodyHTML) + if (html.includes("")) { + var bodyHTML = htmlMinifier.minify(html.substring(html.indexOf("") + 6, html.lastIndexOf(""))) + var parsedHTML = himalaya.parse(bodyHTML) + } else { + var parsedHTML = himalaya.parse(html) + } function scanParsedHTML(json) { for (var i = 0; i < json.length; i++) { @@ -196,7 +199,11 @@ function converter(html) { parsedHTML = himalaya.stringify(parsedHTML) - html = html.substring(0, html.indexOf("")) + parsedHTML + html.substring(html.indexOf("") + 7) + if (html.includes("")) { + html = html.substring(0, html.indexOf("")) + parsedHTML + html.substring(html.indexOf("") + 7) + } else { + html = parsedHTML + } html = html.replaceAll("{LOAD_TIME}", (Date.now() - startTime).toString() + "ms") @@ -205,7 +212,7 @@ function converter(html) { module.exports = { getActivities: function () { - return htmlMinifier.minify(activityToHTML.activitiesToHTML(lanyardData, cachedImages)) + return htmlMinifier.minify(converter(activityToHTML.activitiesToHTML(lanyardData, cachedImages))) }, middleWare: async function (req, res, next) { From 0372cdcf6f0e467dec721836a2049d7e19b09acd Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 31 May 2024 15:24:40 -0500 Subject: [PATCH 13/19] Minor changes, {Keywords} use the old method for performance. --- constants.json | 4 +-- pageUpdater.js | 71 +++++++++++++++++++-------------------- static/socials/index.html | 2 +- static/stats/index.html | 8 +---- 4 files changed, 39 insertions(+), 46 deletions(-) diff --git a/constants.json b/constants.json index e9d097e..39ed2ca 100644 --- a/constants.json +++ b/constants.json @@ -67,6 +67,7 @@ "Fedi": "rgb(175, 125, 200)", "Matrix": "limegreen", "Element": "rgb(100, 255, 200)", + "Code": "rgb(150, 175, 255)", "Codeberg": "rgb(0, 255, 255)", "Docker": "blue", "Github": "gray", @@ -83,7 +84,6 @@ "CSS": "rgb(50, 200, 255)", "Thumbor": "rgb(225, 225, 255)", "Spotify": "limegreen", - "Ultrakill": "red", - "Code": "rgb(150, 175, 255)" + "Ultrakill": "red" } } \ No newline at end of file diff --git a/pageUpdater.js b/pageUpdater.js index 1fc99c8..2bf3732 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -21,7 +21,6 @@ var commitCount = "500+" var lanyardData = undefined var uptime = Date.now() -var reloads = 0 function firstToUpper(str) { return str.charAt(0).toUpperCase() + str.slice(1) @@ -100,7 +99,6 @@ function converter(html) { }, "SPINCOUNT": globalSpins, "UPTIME": timeFormatter((Date.now() - uptime) / 1000), - "RELOAD_COUNT": reloads, "WEATHER_MODIFIER": randomThemer.returnTheme(), "WEATHER_TEXT": "", "ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")), @@ -109,6 +107,25 @@ function converter(html) { } replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " + + while (html.includes("{PATH_")) { + var pagePath = html.substring(html.indexOf("{PATH_")) + pagePath = pagePath.substring(6, pagePath.indexOf('}')) + + var stringIndex = `{PATH_${pagePath}}` + pagePath = pagePath.toLowerCase() + + var pageHTML = fs.readFileSync(path.join(__dirname, 'static', pagePath, 'index.html')).toString() + pageHTML = pageHTML.substring(pageHTML.indexOf('

') + 6, pageHTML.indexOf('
')) + html = html.replaceAll(stringIndex, pageHTML) + } + + var rpTable = Object.keys(replacers) + + for (let index = 0; index < rpTable.length; index++) { + const text = rpTable[index]; + html = html.replaceAll(`{${text}}`, replacers[text]) + } if (html.includes("")) { var bodyHTML = htmlMinifier.minify(html.substring(html.indexOf("") + 6, html.lastIndexOf(""))) @@ -117,42 +134,24 @@ function converter(html) { var parsedHTML = himalaya.parse(html) } - function scanParsedHTML(json) { - for (var i = 0; i < json.length; i++) { - var element = json[i] - if (element.type == "element") { - if (element.children.length > 0) { - element.children = scanParsedHTML(element.children) - } - } else if (element.type == "text") { - while (element.content.includes("{PATH_")) { - var pagePath = element.content.substring(element.content.indexOf("{PATH_")) - pagePath = pagePath.substring(6, pagePath.indexOf('}')) + // function scanParsedHTML(json) { + // for (var i = 0; i < json.length; i++) { + // var element = json[i] + // if (element.type == "element") { + // if (element.children.length > 0) { + // element.children = scanParsedHTML(element.children) + // } + // } else if (element.type == "text") { - var stringIndex = `{PATH_${pagePath}}` - pagePath = pagePath.toLowerCase() + - var pageHTML = fs.readFileSync(path.join(__dirname, 'static', pagePath, 'index.html')).toString() - pageHTML = pageHTML.substring(pageHTML.indexOf('
') + 6, pageHTML.indexOf('
')) - element.content = element.content.replaceAll(stringIndex, pageHTML) - } + // json[i] = element + // } + // } - var rpTable = Object.keys(replacers) - - for (let index = 0; index < rpTable.length; index++) { - const text = rpTable[index]; - element.content = element.content.replaceAll(`{${text}}`, replacers[text]) - } - - // console.log(element.content, himalaya.parse(element.content)) - - json[i] = element - } - } - - return json - } + // return json + // } // var highTable = Object.keys(highlightedWords) @@ -166,9 +165,9 @@ function converter(html) { // element.content = element.content.replaceAll("TEMPORARY_REPLACE", `${term}`) // } - parsedHTML = scanParsedHTML(parsedHTML) + // parsedHTML = scanParsedHTML(parsedHTML) - parsedHTML = himalaya.parse(himalaya.stringify(parsedHTML)) + // parsedHTML = himalaya.parse(himalaya.stringify(parsedHTML)) function highlighter(json) { for (var i = 0; i < json.length; i++) { diff --git a/static/socials/index.html b/static/socials/index.html index 33d6575..e8249b0 100644 --- a/static/socials/index.html +++ b/static/socials/index.html @@ -51,7 +51,7 @@ diff --git a/static/stats/index.html b/static/stats/index.html index 310a47b..6ae3c2a 100644 --- a/static/stats/index.html +++ b/static/stats/index.html @@ -37,13 +37,7 @@
  • Page generation time: {LOAD_TIME}
  • Uptime: {UPTIME}
  • -
  • Total reloads: {RELOAD_COUNT} *1
  • -
  • Cached Images: {CACHED_IMAGES} *2
  • -
-


-
    -
  1. Increments by 1 EVERY time ANY page is loaded.
  2. -
  3. Cached Images are cleared on server restart.
  4. +
  5. Cached Images: {CACHED_IMAGES}
From 134d4e4380070d4279950c42bacbad14173e5921 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sat, 1 Jun 2024 12:43:28 -0500 Subject: [PATCH 14/19] Add Violet's Cache --- constants.json | 1 + 1 file changed, 1 insertion(+) diff --git a/constants.json b/constants.json index 39ed2ca..d211148 100644 --- a/constants.json +++ b/constants.json @@ -55,6 +55,7 @@ "Javascript": "yellow", "NodeJS": "limegreen", "Violets-Purgatory": "rgb(200, 150, 255)", + "Violets-Cache": "rgb(200, 150, 255)", "Violet's": "rgb(200, 150, 255)", "Violets": "rgb(200, 150, 255)", "Violet": "rgb(200, 150, 255)", From 3fe2266e3ef7431fa69deabd7fb886fc06981e44 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sat, 1 Jun 2024 13:45:12 -0500 Subject: [PATCH 15/19] Use Cache Server --- constants.json | 4 -- overcomplicatedStatuses.js | 9 +--- pageUpdater.js | 86 +++++++++++++++++++------------------- 3 files changed, 44 insertions(+), 55 deletions(-) diff --git a/constants.json b/constants.json index d211148..051de54 100644 --- a/constants.json +++ b/constants.json @@ -1,8 +1,4 @@ { - "activityImages": { - "ULTRAKILL": "https://fs.violets-purgatory.dev/SiteActivityImages/ULTRAKILL.jpg", - "Phasmophobia": "https://fs.violets-purgatory.dev/SiteActivityImages/Phasmophobia.png" - }, "discStatuses": { "online": { "text": "Online", diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 08e6e80..5b6c388 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -90,14 +90,7 @@ module.exports = { function get_img(activity, size = "large_image") { - if (cachedImages[get_img_url(activity, size)]) { - var fn = cachedImages[get_img_url(activity, size)] - var fp = path.join(__dirname, 'cached', fn) - } else { - return '/imgs/notFound.png' - } - - return '/cached/' + fn + return "https://cache.violets-purgatory.dev/cached/" + get_img_url(activity, size) } function songStats() { diff --git a/pageUpdater.js b/pageUpdater.js index 2bf3732..d32c48f 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -289,28 +289,28 @@ var lastPong = 0 var activityImages = constants.activityImages var cachedImages = {} -function get_img_url(activity, size = "large_image") { - if ("assets" in activity) { - var image = activity.assets[size] +// function get_img_url(activity, size = "large_image") { +// if ("assets" in activity) { +// var image = activity.assets[size] - if (image) { - if (image.includes("https/")) { - return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length)) - } else if (image.includes("spotify")) { - return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)) - } else { - return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png") - } - } - } +// if (image) { +// if (image.includes("https/")) { +// return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length)) +// } else if (image.includes("spotify")) { +// return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)) +// } else { +// return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png") +// } +// } +// } - if (!image && size == "large_image") { - if (activity.name in activityImages) { - return decodeURIComponent(activityImages[activity.name]) - } - } - return null -} +// if (!image && size == "large_image") { +// if (activity.name in activityImages) { +// return decodeURIComponent(activityImages[activity.name]) +// } +// } +// return null +// } function socketeer() { @@ -353,36 +353,36 @@ function socketeer() { lanyardData = data.d lastLanyardUpdate = Date.now() - for (let index = 0; index < lanyardData.activities.length; index++) { - const activity = lanyardData.activities[index]; + // for (let index = 0; index < lanyardData.activities.length; index++) { + // const activity = lanyardData.activities[index]; - if (get_img_url(activity)) { - var url = get_img_url(activity) - var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension - var fp = path.join(__dirname, 'cached', fn) + // if (get_img_url(activity)) { + // var url = get_img_url(activity) + // var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension + // var fp = path.join(__dirname, 'cached', fn) - if (!cachedImages[url]) { - const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer() - fs.writeFileSync(fp, Buffer.from(response)) + // if (!cachedImages[url]) { + // const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer() + // fs.writeFileSync(fp, Buffer.from(response)) - cachedImages[url] = fn - } - } + // cachedImages[url] = fn + // } + // } - if (get_img_url(activity, "small_image")) { - var url = get_img_url(activity, "small_image") - var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension - var fp = path.join(__dirname, 'cached', fn) + // if (get_img_url(activity, "small_image")) { + // var url = get_img_url(activity, "small_image") + // var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension + // var fp = path.join(__dirname, 'cached', fn) - if (!cachedImages[url]) { - const response = await (await fetch(thumborURL + "64x64/" + thumborArgs + url)).arrayBuffer() + // if (!cachedImages[url]) { + // const response = await (await fetch(thumborURL + "64x64/" + thumborArgs + url)).arrayBuffer() - fs.writeFileSync(fp, Buffer.from(response)) + // fs.writeFileSync(fp, Buffer.from(response)) - cachedImages[url] = fn - } - } - } + // cachedImages[url] = fn + // } + // } + // } } else if (data.op == 4) { globalSpins = data.spins From 8b564d00b1e5d051cee2a800654aff0f7c103111 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 2 Jun 2024 00:17:36 -0500 Subject: [PATCH 16/19] Change {COMMIT_COUNT} to "500" --- constants.json | 2 +- pageUpdater.js | 104 ------------------------------------------------- 2 files changed, 1 insertion(+), 105 deletions(-) diff --git a/constants.json b/constants.json index 051de54..94a5611 100644 --- a/constants.json +++ b/constants.json @@ -20,7 +20,7 @@ "quotes": [ "Remember the 14th commandment: Thou shalt always clean thy plate and not waste anything, whether thy stomach is full, or not.", "I hate javascript!!!", - "Happy {COMMIT_COUNT} commits!", + "Happy 400 500 commits!", "Play Cave Story!", "Cave Story+ Sucks!", "World's Worst Developer", diff --git a/pageUpdater.js b/pageUpdater.js index d32c48f..938794c 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -26,10 +26,6 @@ function firstToUpper(str) { return str.charAt(0).toUpperCase() + str.slice(1) } -var thumborURL = "https://thumbor.violets-purgatory.dev/unsafe/" -var imgExtension = "png" -var thumborArgs = `filters:format(${imgExtension})/` - function timeFormatter(seconds) { seconds = Math.ceil(seconds) var minutes = Math.ceil(seconds / 60) @@ -134,41 +130,6 @@ function converter(html) { var parsedHTML = himalaya.parse(html) } - - // function scanParsedHTML(json) { - // for (var i = 0; i < json.length; i++) { - // var element = json[i] - // if (element.type == "element") { - // if (element.children.length > 0) { - // element.children = scanParsedHTML(element.children) - // } - // } else if (element.type == "text") { - - - - // json[i] = element - // } - // } - - // return json - // } - - // var highTable = Object.keys(highlightedWords) - - // for (let index = 0; index < highTable.length; index++) { - // var term = highTable[index]; - // var replacement = `${term}` - - - // element.content = element.content.replaceAll(`{${term}}`, "TEMPORARY_REPLACE") - // element.content = element.content.replaceAll(term, replacement) - // element.content = element.content.replaceAll("TEMPORARY_REPLACE", `${term}`) - // } - - // parsedHTML = scanParsedHTML(parsedHTML) - - // parsedHTML = himalaya.parse(himalaya.stringify(parsedHTML)) - function highlighter(json) { for (var i = 0; i < json.length; i++) { var element = json[i] @@ -232,12 +193,6 @@ module.exports = { res.contentType(path.basename(filePath)) - // if (req.path.includes(".css")) { - // res.setHeader("Content-Type", "text/css") - // } else if (!req.path.includes(".woff2")) { - // data = converter(data, req.query) - // } - if (filePath.includes(".html")) { data = converter(data, req.query) @@ -286,33 +241,6 @@ updateCommits() var lastLanyardUpdate = Date.now() var lastPong = 0 -var activityImages = constants.activityImages -var cachedImages = {} - -// function get_img_url(activity, size = "large_image") { -// if ("assets" in activity) { -// var image = activity.assets[size] - -// if (image) { -// if (image.includes("https/")) { -// return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length)) -// } else if (image.includes("spotify")) { -// return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)) -// } else { -// return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png") -// } -// } -// } - -// if (!image && size == "large_image") { -// if (activity.name in activityImages) { -// return decodeURIComponent(activityImages[activity.name]) -// } -// } -// return null -// } - - function socketeer() { var lanyard = new WebSocket('https://api.violets-purgatory.dev') @@ -352,38 +280,6 @@ function socketeer() { } else if (data.op == 0) { lanyardData = data.d lastLanyardUpdate = Date.now() - - // for (let index = 0; index < lanyardData.activities.length; index++) { - // const activity = lanyardData.activities[index]; - - // if (get_img_url(activity)) { - // var url = get_img_url(activity) - // var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension - // var fp = path.join(__dirname, 'cached', fn) - - // if (!cachedImages[url]) { - // const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer() - // fs.writeFileSync(fp, Buffer.from(response)) - - // cachedImages[url] = fn - // } - // } - - // if (get_img_url(activity, "small_image")) { - // var url = get_img_url(activity, "small_image") - // var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension - // var fp = path.join(__dirname, 'cached', fn) - - // if (!cachedImages[url]) { - // const response = await (await fetch(thumborURL + "64x64/" + thumborArgs + url)).arrayBuffer() - - // fs.writeFileSync(fp, Buffer.from(response)) - - // cachedImages[url] = fn - // } - // } - // } - } else if (data.op == 4) { globalSpins = data.spins } From 93755b74b17520a3e2670cb42fe84d0acc7540b7 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 2 Jun 2024 00:19:50 -0500 Subject: [PATCH 17/19] I may be dumb --- pageUpdater.js | 4 ++-- static/style.css | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pageUpdater.js b/pageUpdater.js index 938794c..2955028 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -99,7 +99,7 @@ function converter(html) { "WEATHER_TEXT": "", "ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")), "CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString(), - "ACTIVITIES": activityToHTML.activitiesToHTML(lanyardData, cachedImages) + "ACTIVITIES": activityToHTML.activitiesToHTML(lanyardData) } replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " @@ -172,7 +172,7 @@ function converter(html) { module.exports = { getActivities: function () { - return htmlMinifier.minify(converter(activityToHTML.activitiesToHTML(lanyardData, cachedImages))) + return htmlMinifier.minify(converter(activityToHTML.activitiesToHTML(lanyardData))) }, middleWare: async function (req, res, next) { diff --git a/static/style.css b/static/style.css index fdab342..d7f7690 100644 --- a/static/style.css +++ b/static/style.css @@ -207,6 +207,7 @@ br { display: flex; position: relative; z-index: 3; + max-width: 50%; /* max-height: 200px; */ } From 90334a68b3370a361da0b8058bca960cab508c30 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 2 Jun 2024 00:21:13 -0500 Subject: [PATCH 18/19] make mobile formatting on wider screens a little prettier --- static/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/style.css b/static/style.css index d7f7690..b56c785 100644 --- a/static/style.css +++ b/static/style.css @@ -207,7 +207,7 @@ br { display: flex; position: relative; z-index: 3; - max-width: 50%; + max-width: 650px; /* max-height: 200px; */ } From 57852731e46e4c2ec979f2bc2cb59ad257b55b6d Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 2 Jun 2024 18:31:08 -0500 Subject: [PATCH 19/19] FIX < SYMBOLS! --- overcomplicatedStatuses.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 5b6c388..41ffe00 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -28,6 +28,10 @@ function get_img_url(activity, size = "large_image") { return null } +function makeCompat(string) { + return string.replaceAll("<", "<").replaceAll(">", ">") +} + function timeFormatter(seconds) { seconds = Math.ceil(seconds) var minutes = Math.floor(seconds / 60) @@ -98,15 +102,15 @@ module.exports = { if (activity.assets && activity.assets.large_text != activity.details && activity.state.length + activity.assets.large_text.length < 100) { html += ` -
Album: ${activity.assets.large_text || " "} -
Artist: ${activity.state || " "} +
Album: ${makeCompat(activity.assets.large_text || " ")} +
Artist: ${makeCompat(activity.state || " ")} ` } else { html += "
" if (activity.state.includes(";")) { html += "Artists: " } else { html += "Artist: " } - html += `${activity.state || " "}` + html += `${makeCompat(activity.state || " ")}` } return html @@ -119,7 +123,7 @@ module.exports = {

Listening to ${activity.name} -
Song: ${activity.details || " "} +
Song: ${makeCompat(activity.details || " ")} ${songStats()}