fix featured game
This commit is contained in:
@@ -210,7 +210,7 @@
|
||||
"image": "/assets/img/dmd.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Fortnite [USE TOUCHSCREEN]",
|
||||
"name": "Fortnite",
|
||||
"target": "https://now.gg/play/epic-games/7308/fortnite",
|
||||
"image": "https://upload.wikimedia.org/wikipedia/commons/7/7c/Fortnite_F_lettermark_logo.png",
|
||||
"popular": true
|
||||
|
||||
@@ -48,11 +48,11 @@ if (window.self === window.top && location.pathname !== '/view') setTimeout(asyn
|
||||
}, 500);
|
||||
|
||||
if (location.pathname === '/') {
|
||||
fetch('/assets/JSON/games.json')
|
||||
fetch('/api/games')
|
||||
.then(res => res.json())
|
||||
.then(games => {
|
||||
const gameName = 'Fortnite';
|
||||
const game = games.filter(g => g.name === gameName)[0];
|
||||
const game = games.all.filter(g => g.name === gameName)[0];
|
||||
|
||||
document.querySelector('.featured').addEventListener('click', () => {
|
||||
if (isValidURL(game.target)) createViewPage({
|
||||
|
||||
@@ -57,8 +57,6 @@ class Settings {
|
||||
if (navigator.userAgent.includes('Firefox')) document.querySelector('#export_error').innerHTML = 'Your browser does not fully support this feature. Some data may not export.<br><br>';
|
||||
|
||||
document.querySelector('#export').addEventListener('click', () => {
|
||||
//Still in beta
|
||||
//if (false) {
|
||||
const CryptoJSScript = document.createElement('script');
|
||||
CryptoJSScript.src = 'https://unpkg.com/crypto-js@latest/crypto-js.js';
|
||||
document.body.appendChild(CryptoJSScript);
|
||||
@@ -136,12 +134,9 @@ class Settings {
|
||||
if (i + 1 === Object.keys(cookie.all()).length) exportEvents.emit('cookies');
|
||||
} else exportEvents.emit('cookies');
|
||||
});
|
||||
//}
|
||||
});
|
||||
|
||||
document.querySelector('#import').addEventListener('click', () => {
|
||||
//Still in beta
|
||||
//if (false) {
|
||||
const CryptoJSScript = document.createElement('script');
|
||||
CryptoJSScript.src = 'https://unpkg.com/crypto-js@latest/crypto-js.js';
|
||||
document.body.appendChild(CryptoJSScript);
|
||||
@@ -216,7 +211,6 @@ class Settings {
|
||||
reader.readAsText(file);
|
||||
});
|
||||
});
|
||||
//}
|
||||
});
|
||||
|
||||
fetch('/assets/JSON/cloaks.json').then(res => res.json()).then(cloaks => {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<!--
|
||||
Broken
|
||||
|
||||
<script src='https://cdn.jsdelivr.net/npm/@widgetbot/crate@3' async defer>
|
||||
new Crate({
|
||||
server: '950407933408198717',
|
||||
channel: '1182339659402063902'
|
||||
})
|
||||
</script>
|
||||
</script>-->
|
||||
Reference in New Issue
Block a user