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)
|
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) => {
|
process.on('uncaughtException', (err, origin) => {
|
||||||
fs.writeSync(
|
fs.writeSync(
|
||||||
process.stderr.fd,
|
process.stderr.fd,
|
||||||
|
|
|
@ -11,6 +11,8 @@ var highlightedWords = config.highlightedWords
|
||||||
var quotes = config.quotes
|
var quotes = config.quotes
|
||||||
var titles = config.titles
|
var titles = config.titles
|
||||||
|
|
||||||
|
var globalSpins = 0
|
||||||
|
|
||||||
var commitCount = "400+"
|
var commitCount = "400+"
|
||||||
|
|
||||||
var lanyardData = undefined
|
var lanyardData = undefined
|
||||||
|
@ -74,7 +76,8 @@ function converter(html, query) {
|
||||||
"TOPBAR": `<div id="topbar"><h3><a href="/socials">Socials</a></h3></div>`,
|
"TOPBAR": `<div id="topbar"><h3><a href="/socials">Socials</a></h3></div>`,
|
||||||
"DISCORD_USER": username,
|
"DISCORD_USER": username,
|
||||||
"CUSTOM_STATUS": statusText,
|
"CUSTOM_STATUS": statusText,
|
||||||
"LATEST_YOUTUBE": "filler"
|
"LATEST_YOUTUBE": "filler",
|
||||||
|
"SPINCOUNT": globalSpins
|
||||||
}
|
}
|
||||||
|
|
||||||
var rpTable = Object.keys(replacers)
|
var rpTable = Object.keys(replacers)
|
||||||
|
@ -278,6 +281,8 @@ function socketeer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (data.op == 4) {
|
||||||
|
globalSpins = data.spins
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,4 +227,8 @@ ul, ol {
|
||||||
li {
|
li {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noscript {
|
||||||
|
display: none;
|
||||||
}
|
}
|
|
@ -45,8 +45,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
<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>
|
<hr>
|
||||||
<div>
|
<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>
|
<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>
|
||||||
|
|
|
@ -2,4 +2,8 @@
|
||||||
rotate: 7200deg;
|
rotate: 7200deg;
|
||||||
transform: scale(1.15);
|
transform: scale(1.15);
|
||||||
transition: all 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) !important;
|
transition: all 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noscript {
|
||||||
|
display: initial;
|
||||||
}
|
}
|
Loading…
Reference in a new issue