From 5afc521b4d48fb8947bf95f8633d3461fcefab69 Mon Sep 17 00:00:00 2001 From: Astra Date: Sun, 22 Apr 2018 00:05:47 -0400 Subject: [PATCH] test --- shared.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/shared.js b/shared.js index 43e80c6..c5e5431 100644 --- a/shared.js +++ b/shared.js @@ -28,7 +28,28 @@ .then(x => x.json()) .then(r => __goodies = r); - // EndPwn specific features + // early init payload + document.addEventListener('ep-prepared', () => { + + // fetch the changelog + fetch('https://endpwn.github.io/changelog.md?_=' + Date.now()).then(r => r.text()).then(l => { + + // get the changelog object + var log = $api.util.findFuncExports('changeLog'); + var data = l.split(';;'); + + // set the date + if (log.changeLog.date >= data[0]) + log.changeLog.date = data[0]; + + // prepend to the changelog body + log.changeLog.body = data[1] + '\n\n' + log.changeLog.body; + + }); + + }); + + // post-init payload document.addEventListener('ep-ready', () => { window.reload = () => { app.relaunch(); app.exit(); };