mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-05 01:47:16 +00:00
fix: application/json content type from PHP handled correctly in JS
This commit is contained in:
@@ -216,7 +216,9 @@ function fd(url,gd,hd,id){
|
|||||||
if(jd.readyState==4){
|
if(jd.readyState==4){
|
||||||
if(jd.status==200){
|
if(jd.status==200){
|
||||||
var kd=jd.getResponseHeader('Content-Type');
|
var kd=jd.getResponseHeader('Content-Type');
|
||||||
kd=kd.substr(0,kd.indexOf(';'));
|
if (kd.indexOf(';') > -1) {
|
||||||
|
kd=kd.substr(0,kd.indexOf(';'));
|
||||||
|
}
|
||||||
switch(kd){
|
switch(kd){
|
||||||
case'application/json':
|
case'application/json':
|
||||||
if (jd.responseText.indexOf('[]') < 0) {
|
if (jd.responseText.indexOf('[]') < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user