Remove websocket code, show global spin count for users without JS, and new noscript class

This commit is contained in:
bingus_violet 2024-04-21 13:01:21 -05:00
parent 56150f1ce8
commit 02a8a44125
5 changed files with 17 additions and 21 deletions

View file

@ -40,25 +40,6 @@ app.get("/discHTML", (req, res) => {
app.use(pageUpdater.middleWare)
var sockets = []
wsServer = WebSocket.Server;
let server = require('http').createServer()
wsServer = new wsServer({
server: server,
perMessageDeflate: false
})
server.on('request', app)
wsServer.on("connection", function connection(socket) {
console.log("BALLS")
socket.send("FUCK")
})
process.on('uncaughtException', (err, origin) => {
fs.writeSync(
process.stderr.fd,

View file

@ -11,6 +11,8 @@ var highlightedWords = config.highlightedWords
var quotes = config.quotes
var titles = config.titles
var globalSpins = 0
var commitCount = "400+"
var lanyardData = undefined
@ -74,7 +76,8 @@ function converter(html, query) {
"TOPBAR": `<div id="topbar"><h3><a href="/socials">Socials</a></h3></div>`,
"DISCORD_USER": username,
"CUSTOM_STATUS": statusText,
"LATEST_YOUTUBE": "filler"
"LATEST_YOUTUBE": "filler",
"SPINCOUNT": globalSpins
}
var rpTable = Object.keys(replacers)
@ -278,6 +281,8 @@ function socketeer() {
}
}
} else if (data.op == 4) {
globalSpins = data.spins
}
})
}

View file

@ -227,4 +227,8 @@ ul, ol {
li {
font-size: 1.2rem;
text-align: left;
}
.noscript {
display: none;
}

View file

@ -45,8 +45,10 @@
</div>
</div>
</div>
<p class="noscript">Violet has been spun {SPINCOUNT} times!</p>
<p class="spinnyCount" style="display: none;">You have spun Violet <span class="localSpins">4</span> times!<br>
Everyone has spun Violet <span class="globalSpins">2</span> times!</p>
Everyone has spun Violet <span class="globalSpins">{SPINCOUNT}</span> times!</p>
<hr>
<div>
<p style="padding: 10px;">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.</p>

View file

@ -2,4 +2,8 @@
rotate: 7200deg;
transform: scale(1.15);
transition: all 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) !important;
}
.noscript {
display: initial;
}