summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/App.js20
-rw-r--r--assets/js/src/BoardPolling.js2
2 files changed, 1 insertions, 21 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js
index 9aa97061..12889c58 100644
--- a/assets/js/src/App.js
+++ b/assets/js/src/App.js
@@ -112,23 +112,3 @@ Kanboard.App.prototype.showLoadingIcon = function() {
Kanboard.App.prototype.hideLoadingIcon = function() {
$("#app-loading-icon").remove();
};
-
-Kanboard.App.prototype.isVisible = function() {
- var property = "";
-
- if (typeof document.hidden !== "undefined") {
- property = "visibilityState";
- } else if (typeof document.mozHidden !== "undefined") {
- property = "mozVisibilityState";
- } else if (typeof document.msHidden !== "undefined") {
- property = "msVisibilityState";
- } else if (typeof document.webkitHidden !== "undefined") {
- property = "webkitVisibilityState";
- }
-
- if (property !== "") {
- return document[property] == "visible";
- }
-
- return true;
-};
diff --git a/assets/js/src/BoardPolling.js b/assets/js/src/BoardPolling.js
index ba38b779..44ad5379 100644
--- a/assets/js/src/BoardPolling.js
+++ b/assets/js/src/BoardPolling.js
@@ -13,7 +13,7 @@ Kanboard.BoardPolling.prototype.execute = function() {
};
Kanboard.BoardPolling.prototype.check = function() {
- if (this.app.isVisible() && !this.app.get("BoardDragAndDrop").savingInProgress) {
+ if (KB.utils.isVisible() && !this.app.get("BoardDragAndDrop").savingInProgress) {
var self = this;
this.app.showLoadingIcon();