mirror of
https://github.com/EndPwnArchive/endpwn3.git
synced 2024-08-15 00:23:30 +00:00
h
This commit is contained in:
parent
0c94e41785
commit
ec80470907
1 changed files with 13 additions and 8 deletions
21
shared.js
21
shared.js
|
@ -34,16 +34,21 @@
|
||||||
// fetch the changelog
|
// fetch the changelog
|
||||||
fetch('https://endpwn.github.io/changelog.md?_=' + Date.now()).then(r => r.text()).then(l => {
|
fetch('https://endpwn.github.io/changelog.md?_=' + Date.now()).then(r => r.text()).then(l => {
|
||||||
|
|
||||||
// get the changelog object
|
// we're racing discord's initialization procedures; try and hit a timing sweetspot
|
||||||
var log = $api.util.findFuncExports('changeLog');
|
setTimeout(() => {
|
||||||
var data = l.split(';;');
|
|
||||||
|
|
||||||
// set the date
|
// get the changelog object
|
||||||
if (log.changeLog.date <= data[0])
|
var log = $api.util.findFuncExports('changeLog');
|
||||||
log.changeLog.date = data[0];
|
var data = l.split(';;');
|
||||||
|
|
||||||
// prepend to the changelog body
|
// set the date
|
||||||
log.changeLog.body = data[1] + '\n\n' + log.changeLog.body;
|
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;
|
||||||
|
|
||||||
|
}, 100);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue