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