From 3acd3794b2a918a16aef9931346d0d1ee3d991ab Mon Sep 17 00:00:00 2001 From: Hugo Giraudel Date: Fri, 1 Apr 2016 16:35:12 +0200 Subject: [PATCH] Removed an unwanted console.log(..) --- a11y-toggle.js | 1 - a11y-toggle.min.js | 2 +- example/main.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/a11y-toggle.js b/a11y-toggle.js index 72da673..91ddc4c 100644 --- a/a11y-toggle.js +++ b/a11y-toggle.js @@ -16,7 +16,6 @@ while (el) { if (el.nodeType === 1 && el[matches](selector)) { - console.log(el); return el; } diff --git a/a11y-toggle.min.js b/a11y-toggle.min.js index 3de8208..82f14bb 100644 --- a/a11y-toggle.min.js +++ b/a11y-toggle.min.js @@ -1 +1 @@ -!function(){"use strict";function t(t){return Array.prototype.slice.call(document.querySelectorAll(t))}function e(t,e){if(t.closest)return t.closest(e);for(var r=t.webkitMatchesSelector?"webkitMatchesSelector":t.msMatchesSelector?"msMatchesSelector":"matches";t;){if(1===t.nodeType&&t[r](e))return console.log(t),t;t=t.parentNode}return null}var r=0,a=t("[data-a11y-toggle]").reduce(function(t,e){var a=e.getAttribute("data-a11y-toggle");return e.id||e.setAttribute("id","a11y-toggle-"+r++),e.hasAttribute("aria-expanded")||e.setAttribute("aria-expanded",!0),e.setAttribute("aria-controls",a),t["#"+a]=t["#"+a]||[],t["#"+a].push(e),t},{}),i=t(Object.keys(a)).reduce(function(t,e){var r=a["#"+e.id].map(function(t){return t.id}).join(" ");return e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden",!1),e.hasAttribute("aria-labelledby")||e.setAttribute("aria-labelledby",r),t[e.id]=e,t},{});document.addEventListener("click",function(t){var r=e(t.target,"[data-a11y-toggle]"),n=r&&i[r.getAttribute("aria-controls")];if(!n)return!1;var u="false"===n.getAttribute("aria-hidden"),o=a["#"+n.id];n.setAttribute("aria-hidden",u),o.forEach(function(t){return t.setAttribute("aria-expanded",!u)})})}(); \ No newline at end of file +!function(){"use strict";function t(t){return Array.prototype.slice.call(document.querySelectorAll(t))}function e(t,e){if(t.closest)return t.closest(e);for(var r=t.webkitMatchesSelector?"webkitMatchesSelector":t.msMatchesSelector?"msMatchesSelector":"matches";t;){if(1===t.nodeType&&t[r](e))return t;t=t.parentNode}return null}var r=0,a=t("[data-a11y-toggle]").reduce(function(t,e){var a=e.getAttribute("data-a11y-toggle");return e.id||e.setAttribute("id","a11y-toggle-"+r++),e.hasAttribute("aria-expanded")||e.setAttribute("aria-expanded",!0),e.setAttribute("aria-controls",a),t["#"+a]=t["#"+a]||[],t["#"+a].push(e),t},{}),i=t(Object.keys(a)).reduce(function(t,e){var r=a["#"+e.id].map(function(t){return t.id}).join(" ");return e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden",!1),e.hasAttribute("aria-labelledby")||e.setAttribute("aria-labelledby",r),t[e.id]=e,t},{});document.addEventListener("click",function(t){var r=e(t.target,"[data-a11y-toggle]"),n=r&&i[r.getAttribute("aria-controls")];if(!n)return!1;var u="false"===n.getAttribute("aria-hidden"),c=a["#"+n.id];n.setAttribute("aria-hidden",u),c.forEach(function(t){return t.setAttribute("aria-expanded",!u)})})}(); \ No newline at end of file diff --git a/example/main.js b/example/main.js index 72da673..91ddc4c 100644 --- a/example/main.js +++ b/example/main.js @@ -16,7 +16,6 @@ while (el) { if (el.nodeType === 1 && el[matches](selector)) { - console.log(el); return el; }