aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/resources/js/admin_v2.js
diff options
context:
space:
mode:
authorGitea <gitea@fake.local>2021-11-10 17:53:13 +0100
committerGitea <gitea@fake.local>2021-11-10 17:53:13 +0100
commit7b4af63a90a726b98a59b83e53f040a7a566a11d (patch)
treeb85747947816fe4375e85ab6b822ffabec548c7b /Neutron-trunk/resources/js/admin_v2.js
parent80f78c2925530e945503ab603e79d1acc53075f4 (diff)
downloadelectrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.gz
electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.bz2
electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.zip
Update
Diffstat (limited to 'Neutron-trunk/resources/js/admin_v2.js')
-rw-r--r--Neutron-trunk/resources/js/admin_v2.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/Neutron-trunk/resources/js/admin_v2.js b/Neutron-trunk/resources/js/admin_v2.js
new file mode 100644
index 0000000..ab7249d
--- /dev/null
+++ b/Neutron-trunk/resources/js/admin_v2.js
@@ -0,0 +1,14 @@
+// noinspection JSUnresolvedFunction
+
+Array.from(document.getElementsByClassName("inner-item")).forEach((item) => {
+ item.onclick = () => {
+ if (item.getAttribute("data-item-href").startsWith("parent://")) {
+ window.open("https://" + item.getAttribute("data-item-href").substr("parent://".length));
+ } else if (item.getAttribute("data-item-href").startsWith("top://")) {
+ window.parent.location.href = item.getAttribute("data-item-href").substr("top://".length);
+ } else {
+ $(document.body).fadeOut(75);
+ location.href = item.getAttribute("data-item-href")
+ }
+ }
+}) \ No newline at end of file