Moved sizecheck and hopefully improved search results

This commit is contained in:
GDColon 2019-11-06 23:07:31 -05:00
parent 0e232542b8
commit 7bdf569040
3 changed files with 11 additions and 5 deletions

View file

@ -55,7 +55,9 @@ colors.json - The colors for generating icons
level.json - An array of the official GD tracks, and also difficulty face stuff for level searching
mapPacks.json - The IDs for the levels in map packs. I can't believe I have to hardcode this.
mapPacks.json - The IDs for the levels in map packs. I can't believe I have to hardcode this.
sizecheck.js - Excecuted on most pages, used for the 'page isn't wide enough' message, back button, and a few other things
XOR.js - Decrypts ciphered GD passwords. I stole the code from somewhere so uh if you wrote it, please don't hunt me down

View file

@ -1,10 +1,10 @@
const express = require('express');
const path = require('path');
const fs = require("fs")
const timeout = require('connect-timeout')
const compression = require('compression');
let api = true;
let gdicons = fs.readdirSync('./icons/iconkit')
const compression = require('compression');
const app = express();
app.use(compression());
app.use(express.json());
@ -134,7 +134,11 @@ app.get("/api/mappacks", async function(req, res) {
app.get("/api/credits", function(req, res) {
res.send(require('./misc/credits.json'))
})
})
app.get("/assets/sizecheck.js", function(req, res) {
res.sendFile(__dirname + "/misc/sizecheck.js")
})
app.get("/iconkit", function(req, res) {
res.sendFile(__dirname + "/html/iconkit.html")

View file

@ -1,5 +1,5 @@
$('body').append(`
<div id="tooSmall" class="brownbox center supercenter" style="display: none; width: 80%">
<div data-nosnippet id="tooSmall" class="brownbox center supercenter" style="display: none; width: 80%">
<h1>Yikes!</h1>
<p>Your <span style="color:#4CDA5B">screen</span> isn't <span style="color:aqua">wide</span> enough to <span style="color:yellow">display</span> this <span style="color:#4CDA5B">page</span>.<br>
Please <span style="color:yellow">rotate</span> your <span style="color:#4CDA5B">device</span> <span style="color:aqua">horizontally</span> or <span style="color:yellow">resize</span> your <span style="color:#4CDA5B">window</span> to be <span style="color:aqua">longer</span>.