Skip to content

Commit

Permalink
additional patch on redirect (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautam98 authored Mar 30, 2020
1 parent fb3e3b7 commit 87b7012
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/heatmap/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ function redirect(url, text = '', sec = 5) {
window.location.href = url;
}
setInterval(function() {
if (!timer) {
window.location.href = url;
}
if (Loading.instance&&Loading.instance.parentNode) {
Loading.text.textContent = `${text} ${timer}s.`;
} else {
Expand Down
3 changes: 3 additions & 0 deletions apps/labeling/labeling.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ function redirect(url, text = '', sec = 5) {
window.location.href = url;
}
setInterval(function() {
if (!timer) {
window.location.href = url;
}
if (Loading.instance.parentNode) {
Loading.text.textContent = `${text} ${timer}s.`;
} else {
Expand Down
3 changes: 3 additions & 0 deletions apps/viewer/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,9 @@ function redirect(url, text = '', sec = 5) {
window.location.href = url;
}
setInterval(function() {
if (!timer) {
window.location.href = url;
}
if (Loading.instance && Loading.instance.parentNode) {
Loading.text.textContent = `${text} ${timer}s.`;
} else {
Expand Down
3 changes: 3 additions & 0 deletions common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ function redirect(url, text = '', sec = 5) {
window.location.href = url;
}
setInterval(function() {
if (!timer) {
window.location.href = url;
}
if (Loading.instance && Loading.instance.parentNode) {
Loading.text.textContent = `${text} ${timer}s.`;
} else {
Expand Down
3 changes: 3 additions & 0 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ function redirect(url, text = '', sec = 5) {
window.location.href = url;
}
setInterval(function() {
if (!timer) {
window.location.href = url;
}
if (Loading.instance.parentNode) {
Loading.text.textContent = `${text} ${timer}s.`;
} else {
Expand Down

0 comments on commit 87b7012

Please sign in to comment.