Fix unnecessary redirect on comment insertion in some skins

This commit is contained in:
Kijin Sung 2016-03-04 15:07:03 +09:00
parent 54fc1da600
commit 006474cb98
2 changed files with 63 additions and 34 deletions

View file

@ -104,6 +104,8 @@
// 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 && !$.isFunction(callback_success)) {
if (data.redirect_url.indexOf(window.location.href.replace(/#.+$/, "") + "#") === 0)
{
window.location = data.redirect_url;
@ -232,6 +234,8 @@
// 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 && !$.isFunction(callback_success)) {
if (data.redirect_url.indexOf(window.location.href.replace(/#.+$/, "") + "#") === 0)
{
window.location = data.redirect_url;