Remove websocket code, show global spin count for users without JS, and new noscript class
This commit is contained in:
parent
56150f1ce8
commit
02a8a44125
5 changed files with 17 additions and 21 deletions
19
index.js
19
index.js
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -228,3 +228,7 @@ li {
|
|||
font-size: 1.2rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.noscript {
|
||||
display: none;
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -3,3 +3,7 @@
|
|||
transform: scale(1.15);
|
||||
transition: all 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) !important;
|
||||
}
|
||||
|
||||
.noscript {
|
||||
display: initial;
|
||||
}
|
Loading…
Reference in a new issue