diff options
-rw-r--r-- | web/packs/userpref.js | 53 | ||||
-rw-r--r-- | webpack.config.js | 1 |
2 files changed, 0 insertions, 54 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 diff --git a/webpack.config.js b/webpack.config.js index a6dd3e3..4562395 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,7 +9,6 @@ module.exports = { graphiql: './web/packs/graphiql.js', index: './web/packs/index.js', useflags: './web/packs/useflags.js', - userpref: './web/packs/userpref.js', }, mode: 'production', output: { |