mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Fix no redirect after writing a comment
This commit is contained in:
parent
1b372375a4
commit
54fc1da600
1 changed files with 27 additions and 3 deletions
|
|
@ -102,9 +102,18 @@
|
|||
}
|
||||
|
||||
// If the response contains a redirect URL, redirect immediately.
|
||||
if (result.redirect_url) {
|
||||
window.location = result.redirect_url.replace(/&/g, "&");
|
||||
return null;
|
||||
if (data.redirect_url) {
|
||||
data.redirect_url = data.redirect_url.replace(/&/g, "&");
|
||||
if (data.redirect_url.indexOf(window.location.href.replace(/#.+$/, "") + "#") === 0)
|
||||
{
|
||||
window.location = data.redirect_url;
|
||||
window.location.reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location = data.redirect_url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// If there was a success callback, call it.
|
||||
|
|
@ -220,6 +229,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
// If the response contains a redirect URL, redirect immediately.
|
||||
if (data.redirect_url) {
|
||||
data.redirect_url = data.redirect_url.replace(/&/g, "&");
|
||||
if (data.redirect_url.indexOf(window.location.href.replace(/#.+$/, "") + "#") === 0)
|
||||
{
|
||||
window.location = data.redirect_url;
|
||||
window.location.reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location = data.redirect_url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// If there was a success callback, call it.
|
||||
if($.isFunction(callback_success)) {
|
||||
callback_success(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue