From ed33f4b7be130b1c45ed224aca38e18b58b6f268 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Wed, 24 Apr 2024 14:42:44 -0500 Subject: [PATCH] Remove weather --- pageUpdater.js | 17 +------- weatherGenerator.js | 103 -------------------------------------------- 2 files changed, 2 insertions(+), 118 deletions(-) delete mode 100644 weatherGenerator.js diff --git a/pageUpdater.js b/pageUpdater.js index e7563c5..7069f2c 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -2,8 +2,8 @@ const path = require('path'), fs = require('fs'), WebSocket = require('ws'), minify = require('minify-html'), - activityToHTML = require("./overcomplicatedStatuses.js"), - weatherGenerator = require("./weatherGenerator") + activityToHTML = require("./overcomplicatedStatuses.js") + // weatherGenerator = require("./weatherGenerator") var config = JSON.parse(fs.readFileSync(path.join(__dirname, 'config.json'))) @@ -121,19 +121,6 @@ function converter(html, query) { html = html.substring(0, html.indexOf("")) + bodyHTML + html.substring(html.indexOf("") + 7) - var weathers = ["none"] - - var weather = weathers[time.getDate() % weathers.length] - - if (weather == "rain" || "rain" in query || "hardRain" in query) { - html = html.replaceAll("{WEATHER_MODIFIER}", weatherGenerator.makeRain("hardRain" in query)) - - html = html.replaceAll("{WEATHER_TEXT}", `The rain is so pretty... I wish I saw it more...`) - } else { - html = html.replaceAll("{WEATHER_MODIFIER}", "") - html = html.replaceAll("{WEATHER_TEXT}", "") - } - html = html.replaceAll("{LOAD_TIME}", (Date.now() - startTime).toString() + "ms") return html diff --git a/weatherGenerator.js b/weatherGenerator.js deleted file mode 100644 index 5c57a8b..0000000 --- a/weatherGenerator.js +++ /dev/null @@ -1,103 +0,0 @@ -module.exports = { - - makeRain: function (hardRain) { - var html = "" - - html += `
` - - html += - ` - - ` - - var amount = 7 - - var iterationReducer = 3 - - if (hardRain) { - amount = 100 - } - - for (let index = 0; index < amount; index++) { - html += `
` - } - html += "" - html += "
" - - return html - } -} \ No newline at end of file