mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-02 22:45:02 +03:00
main.js: если url для ajax-запроса начинается с "/", то нефиг добавлять
к нему начало
This commit is contained in:
parent
d5d327b5d7
commit
92445fe144
|
@ -340,7 +340,7 @@ ls = (function ($) {
|
|||
}
|
||||
});
|
||||
|
||||
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0) {
|
||||
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0 && url.indexOf('/')!=0) {
|
||||
url=aRouter['ajax']+url+'/';
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ ls = (function ($) {
|
|||
if (typeof(form)=='string') {
|
||||
form=$('#'+form);
|
||||
}
|
||||
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0) {
|
||||
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0 && url.indexOf('/')!=0) {
|
||||
url=aRouter['ajax']+url+'/';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue