]> nos-oignons.net Git - website.git/blobdiff - scripts.js
Déplacement des ressources cachables sous assets/
[website.git] / scripts.js
diff --git a/scripts.js b/scripts.js
deleted file mode 100644 (file)
index 28f09b5..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-document.addEventListener("DOMContentLoaded", function() {
-
-    // Add JS class
-    document.querySelector('body').classList.add('js');
-
-    // Create the dropdown base
-    var select = document.createElement("select");
-
-    // Create default option "Go to..."
-    var opt = document.createElement("option")
-    opt.setAttribute("selected", "selected")
-    opt.setAttribute("value", "")
-    opt.innerHTML = "Aller à ...";
-    select.appendChild(opt);
-
-    // Populate dropdown with menu items
-    [].forEach.call(document.querySelectorAll('nav.menu a'), function(el) {
-        var opt = document.createElement("option");
-        opt.setAttribute("value", el.href)
-        opt.innerHTML = el.text;
-        select.appendChild(opt);
-    });
-
-    // To make dropdown actually work
-    // To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/
-    select.addEventListener('change', function(el) {
-      window.location = select.value
-    });
-
-    // Add select to menuWrapper
-    document.querySelectorAll('nav.menu')[0].appendChild(select);
-});
\ No newline at end of file