forked from La_Bureautique/zeg1jeux
La Bureautique se meurt
parent
c7c6598a52
commit
e7841d40de
|
@ -88,12 +88,12 @@ $games = [
|
|||
$radiuses = [5, 10, 20, 50, 100];
|
||||
|
||||
define('DEFAULT_GAME', 'spationaute');
|
||||
define('GAME_JS_DIR', 'themes/'. $_SESSION['gameId'] . '/js/map');
|
||||
|
||||
if (!isset($_SESSION['gameId'])) {
|
||||
|
||||
$_SESSION['gameId'] = DEFAULT_GAME;
|
||||
}
|
||||
define('GAME_JS_DIR', 'themes/'. $_SESSION['gameId'] . '/js/map');
|
||||
|
||||
|
||||
define('DEFAULT_WEBPAGE_TITLE', 'La bureautique');
|
||||
|
|
|
@ -162,7 +162,7 @@ function storeAtFreds (json) {
|
|||
const controller = new AbortController()
|
||||
const timeoutId = setTimeout( () => {
|
||||
controller.abort()
|
||||
}, 2000)
|
||||
}, 15000)
|
||||
var fetchOpts = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
@ -189,14 +189,19 @@ function storeAtFreds (json) {
|
|||
const controller2 = new AbortController()
|
||||
const timeoutId2 = setTimeout( () => {
|
||||
controller.abort()
|
||||
}, 2000)
|
||||
}, 15000)
|
||||
var fetchOpts2 = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
// 'Accept': 'txt/html'
|
||||
'Accept': 'text/html',
|
||||
'Content-Type': 'text/html',
|
||||
// 'Access-Control-Allow-Origin': '*',
|
||||
'Origin': 'la-bureautique',
|
||||
'Referrer-Policy': 'unsafe-url'
|
||||
},
|
||||
signal: controller2.signal,
|
||||
redirect: 'follow'
|
||||
mode: 'cors',
|
||||
redirect: 'follow',
|
||||
signal: controller2.signal
|
||||
}
|
||||
fetch(url, fetchOpts2)
|
||||
.then(html => {
|
||||
|
@ -246,7 +251,7 @@ fetchImmaterial(5)
|
|||
console.error(error)
|
||||
})
|
||||
|
||||
fetchShippable(25)
|
||||
fetchShippable(5)
|
||||
.then(records => {
|
||||
|
||||
displayShippable(records.hits.hits)
|
||||
|
|
Loading…
Reference in New Issue