diff --git a/app.js b/app.js index ad85eff1..c2965955 100644 --- a/app.js +++ b/app.js @@ -391,11 +391,20 @@ app.use(config.prefix, async (req, res, next) => { res.send(proxy.sendResponse); }); +app.post('/', async (req, res) => { + switch (req.url) { + case '/': + return res.send(fs.readFileSync(path.join(__dirname, 'public', 'index.html'), 'utf8')); + } +}); + //Querystrings -app.get('/', async (req, res) => { +app.get('/', async (req, res, t) => res.send(fs.readFileSync(path.join(__dirname, 'public', 'pages,index.html,info.html,archive,archive,hidden.html'.split(',')['/,/?in,/?fg,/?rr,/?j'.split(',').indexOf(req.url) + 1], ',surf.html,f.html,run.html,frames,redirects3,proxnav5,nav7'.replace(/,[^,]+/g, e => ([] + e.match(/\D+/)).repeat(+e.match(/\d+/) + 1)).split(',')[t = 'z,fg,rr,k,dd,n,yh,ym,a,b,y,e,d,p,c,f,g,h,i,m,t,x'.split(',').indexOf(req.url.slice(2)) + 1], (t = ',,,,krunker,discordprox,chatbox,ythub,ytmobile,alloy,node,youtube,pydodge,discordhub,pmprox,credits,flash,gtools,games5,icons,gba,terms,bookmarklets'.split(',')[t]) && t + '.html'), 'utf8'))); +//Querystrings Old +/* app.get('/', async (req, res) => { - /* + const path = require("path"); //Use this for path. fs.readFileSync( path, options ); @@ -407,11 +416,9 @@ app.get('/', async (req, res) => { encoding: 'utf8' })); } - */ - - /* var hbsites = {}; + var hbsites = {}; && hostname == hbsites - */ + switch (req.url) { case '/': @@ -538,9 +545,9 @@ app.get('/', async (req, res) => { switch (req.url) { case '/?j': return res.send(fs.readFileSync(path.join(__dirname, 'public', 'hidden.html'), 'utf8')) - } + } -}); +}); */ app.use('/', express.static('public')); diff --git a/public/archive/f.html b/public/archive/f.html index 3b3a3b03..36c79253 100644 --- a/public/archive/f.html +++ b/public/archive/f.html @@ -3,7 +3,6 @@ Flash Games - diff --git a/public/pages/nav/flash.html b/public/pages/nav/flash.html index 35cdd53a..d028ff71 100644 --- a/public/pages/nav/flash.html +++ b/public/pages/nav/flash.html @@ -195,7 +195,7 @@ Redshift Revenant2 Run2 - Run3 + Run3 Saszombieassault3 Shoppingcarthero3 Siftheads