Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
Static
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2c24bd5
authored
3 years ago
by
dabai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
e3a8db78
master
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
js/common2.js
js/common2.js
View file @
b2c24bd5
...
...
@@ -53,14 +53,22 @@ function $ajax(opt) {
}
xmlHttp
.
onreadystatechange
=
function
()
{
var
res
;
if
(
xmlHttp
.
readyState
==
4
&&
xmlHttp
.
status
==
200
)
{
res
=
xmlHttp
.
responseText
;
if
(
this
.
readyState
!=
4
)
return
;
if
(
this
.
status
==
200
||
this
.
status
==
304
)
{
res
=
this
.
responseText
;
if
(
opt
.
dataType
==
'json'
)
{
res
=
JSON
.
parse
(
res
);
}
resolve
(
res
);
}
else
{
reject
(
new
Error
(
this
.
statusText
));
}
};
xmlHttp
.
onerror
=
function
()
{
reject
(
new
Error
(
this
.
statusText
));
};
})
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment