aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin-v2/$resources/admin.js
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
commit529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch)
tree8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/cms-special/admin-v2/$resources/admin.js
parent15e4724761c50b30803df1811a525c85058f70bf (diff)
downloadelectrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/$resources/admin.js')
-rw-r--r--Neutron-trunk/cms-special/admin-v2/$resources/admin.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/admin.js b/Neutron-trunk/cms-special/admin-v2/$resources/admin.js
new file mode 100644
index 0000000..bca683b
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin-v2/$resources/admin.js
@@ -0,0 +1,16 @@
+window.onscroll = () => {
+ // console.log("> Scroll");
+ if (window.scrollY >= 52 && !document.getElementById('portal-background').classList.contains('scrolled')) {
+ // console.log("> ADD");
+ document.getElementById('portal-background').classList.add('scrolled');
+ } else if (window.scrollY < 52 && document.getElementById('portal-background').classList.contains('scrolled')) {
+ // console.log("> REMOVE");
+ document.getElementById('portal-background').classList.remove('scrolled');
+ } else {
+ // console.log("> Nothing");
+ }
+}
+
+window.onbeforeunload = () => {
+ window.parent.$("#loader").fadeIn(200);
+} \ No newline at end of file