mirror of
https://github.com/EndPwnArchive/endpwn3.git
synced 2024-08-15 00:23:30 +00:00
test
This commit is contained in:
parent
bcd69c7141
commit
5afc521b4d
1 changed files with 22 additions and 1 deletions
23
shared.js
23
shared.js
|
@ -28,7 +28,28 @@
|
||||||
.then(x => x.json())
|
.then(x => x.json())
|
||||||
.then(r => __goodies = r);
|
.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', () => {
|
document.addEventListener('ep-ready', () => {
|
||||||
|
|
||||||
window.reload = () => { app.relaunch(); app.exit(); };
|
window.reload = () => { app.relaunch(); app.exit(); };
|
||||||
|
|
Loading…
Reference in a new issue