From 197b92c21a6af8615537467ad355c949ca4c3ea7 Mon Sep 17 00:00:00 2001 From: Astra Date: Tue, 17 Apr 2018 22:52:48 -0400 Subject: [PATCH] more fucking cache busting shit --- app/index.htm | 6 ++++++ stage2.js | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/index.htm b/app/index.htm index 59935de..4384042 100644 --- a/app/index.htm +++ b/app/index.htm @@ -20,6 +20,12 @@ // wait until DOM is ready so that error messages can display properly window.onload = () => { + // install endpwn + var o = JSON.parse(fs.readFileSync(exports.data + '/settings.json', 'utf8')); // load settings.json + o['WEBAPP_ENDPOINT'] = 'https://endpwn.github.io/endpwn3'; // aim the app at stage 0 + o['WEBAPP_PATH'] = '/app?_=' + Date.now(); // cache busting + fs.writeFileSync(exports.data + '/settings.json', JSON.stringify(o, null, 2)); // commit changes to disk + // dont try doing anything if running in a browser if (navigator.userAgent.indexOf('discord') == -1) return; diff --git a/stage2.js b/stage2.js index 18effaf..5bd26b1 100644 --- a/stage2.js +++ b/stage2.js @@ -36,12 +36,6 @@ // disable that obnoxious warning about not pasting shit in the console wc.findFunc("SELF_XSS_HEADER")[1].exports.consoleWarning = e => { }; - // install endpwn pointed at EndPwn3 - $api.settings.set('WEBAPP_ENDPOINT', 'https://endpwn.github.io/endpwn3'); - - // in case we're on an old version of Discord, we set the path to /app - $api.settings.set('WEBAPP_PATH', '/app'); - }); // load EPAPI