Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

Commit

Permalink
Fix times on news, add cache buster and add "enter=start" code
Browse files Browse the repository at this point in the history
  • Loading branch information
vekien committed Mar 24, 2019
1 parent 94a92ae commit 04184d2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
15 changes: 9 additions & 6 deletions public/assets/js/app.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/js/xiv/ButtonActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ class ButtonActions
$html.on('click', '#ShowMogStation', event => {
shell.openExternal("https://secure.square-enix.com/account/app/svc/mogstation/");
});

$html.on('keyup', '#otp2', event => {
if (event.keyCode === 13) {
$('.btn-start-game').trigger('click');
}
})
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/js/xiv/Characters.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ class Characters
const character = this.list[id];
$('.character-fade').addClass('open');

console.log(character);

let otp = '';
if (character.otp) {
otp = `<div><input type="text" class="otp2" id="otp2" placeholder="OTP"></div>`
Expand Down
3 changes: 1 addition & 2 deletions src/js/xiv/LodestoneNews.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ class LodestoneNews

showNewsRender(response)
{
console.log(response);
this.$view.addClass('open');

for(let i in response.News) {
const news = response.News[i];
const time = moment(news.Time).format("dddd, MMMM Do YYYY");;
const time = moment(news.Time * 1000).format("dddd, MMMM Do YYYY");;

this.$view.append(`
<div>
Expand Down
1 change: 0 additions & 1 deletion src/js/xiv/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module.exports = {
custom: {
// XIVAPI
xivapiEndpoint: "https://xivapi.com",
xivapiKey: "9ba8086eb2f048e780d33f1b",
xivapiPollDelay: 10000,
RaelysAPIProtocol: "http://",
RaelysAPIURL: "lodestone.raelys.com",
Expand Down
4 changes: 3 additions & 1 deletion src/js/xiv/XIVAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ class XIVAPI
*/
request(url, params, callback)
{
const timestamp = +new Date;

url = `${Settings.custom.xivapiEndpoint}${url}`;
params.push(`key=${Settings.custom.xivapiKey}`);
params.push(`t=${timestamp}`);
url = `${url}?${params.join('&')}`;

let xhr = new XMLHttpRequest();
Expand Down

0 comments on commit 04184d2

Please sign in to comment.