aboutsummaryrefslogtreecommitdiff
path: root/app/cdn/js/iframe.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/cdn/js/iframe.js')
-rw-r--r--app/cdn/js/iframe.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/app/cdn/js/iframe.js b/app/cdn/js/iframe.js
deleted file mode 100644
index a031872..0000000
--- a/app/cdn/js/iframe.js
+++ /dev/null
@@ -1,48 +0,0 @@
-function iframeURLChange(iframe, callback) {
- var unloadHandler = function () {
- setTimeout(function () {
- callback(iframe.contentWindow.location.href);
- }, 0);
- };
-
- function attachUnload() {
- iframe.contentWindow.removeEventListener("pagehide", unloadHandler);
- iframe.contentWindow.addEventListener("pagehide", unloadHandler);
- iframe.contentWindow.removeEventListener("unload", unloadHandler);
- iframe.contentWindow.addEventListener("unload", unloadHandler);
- }
-
- iframe.addEventListener("load", attachUnload);
- attachUnload();
-}
-
-Array.from(document.getElementsByTagName("iframe")).forEach((par) => {
- iframeURLChange(par, function (newURL) {
- $(".loader").fadeIn(200);
- });
-})
-
-function unload() {
- $(".loader").fadeIn(200);
-}
-
-Array.from(document.getElementsByTagName("iframe")).forEach((par) => {
- par.onbeforeunload = unload
-})
-
-function loaded () {
- $(".loader").fadeOut(200);
-
- setTimeout(() => {
- $(".loader").fadeOut(200);
- }, 300)
-
- setTimeout(() => {
- $(".loader").fadeOut(200);
- }, 1500);
-}
-
-Array.from(document.getElementsByTagName("iframe")).forEach((par) => {
- par.onload = loaded;
- par.onabort = loaded;
-}) \ No newline at end of file