aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-07-18 20:28:39 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-07-18 20:28:39 +0300
commit0efc31e37581967df6447c18a8d712603613fc9e (patch)
treee2d8aee73017927eb8fc2ce20edcd3f408827069 /web
parentdocker-compose: improve watchtower args (diff)
downloadsoko-0efc31e37581967df6447c18a8d712603613fc9e.tar.gz
soko-0efc31e37581967df6447c18a8d712603613fc9e.tar.bz2
soko-0efc31e37581967df6447c18a8d712603613fc9e.zip
remove userpref.js
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'web')
-rw-r--r--web/packs/userpref.js53
1 files changed, 0 insertions, 53 deletions
diff --git a/web/packs/userpref.js b/web/packs/userpref.js
deleted file mode 100644
index 00a2d09..0000000
--- a/web/packs/userpref.js
+++ /dev/null
@@ -1,53 +0,0 @@
-window.onload = function() {
- document.body.onscroll = function(){
- updateNav();
- };
-};
-
-document.addEventListener("turbolinks:load", function() {
-
- updateNav();
-})
-
-function updateNav() {
- var elements = [];
-
- if(window.location.href.includes("/user/preferences/packages")){
- elements = ['overview', 'dependencies', 'qa-report', 'pull-requests', 'bugs', 'security', 'changelog', 'tabs'];
- }else if(window.location.href.includes("/user/preferences/arches")){
- elements = ['keywords', 'defaults'];
- }
-
- for(var i = 0; i < elements.length; i++){
- if (document.getElementById(elements[i]).getBoundingClientRect().y <= window.innerHeight) {
- document.getElementById(elements[i]+"-tab").classList.add("active");
- } else {
- document.getElementById(elements[i]+"-tab").classList.remove("active");
- }
- }
-}
-
-if(document.getElementById("myModal") != null) {
- var modal = document.getElementById("myModal");
-
- var img1 = document.getElementById("img1");
- var img2 = document.getElementById("img2");
- var modalImg = document.getElementById("img01");
- var captionText = document.getElementById("caption");
- img1.onclick = function () {
- modal.style.display = "block";
- modalImg.src = this.src;
- captionText.innerHTML = this.alt;
- }
- img2.onclick = function () {
- modal.style.display = "block";
- modalImg.src = this.src;
- captionText.innerHTML = this.alt;
- }
-
- var span = document.getElementsByClassName("close")[0];
-
- span.onclick = function () {
- modal.style.display = "none";
- }
-} \ No newline at end of file