From 74dccb1e904e9889d6cf4371a8dd4d6d7e6a2fe5 Mon Sep 17 00:00:00 2001 From: JP Rodrigues Date: Sun, 30 Apr 2017 16:20:19 -0300 Subject: [PATCH] =?UTF-8?q?Refatora=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/js/gainTime.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/js/gainTime.js b/build/js/gainTime.js index 4db28a7..0ba4d14 100644 --- a/build/js/gainTime.js +++ b/build/js/gainTime.js @@ -2,9 +2,9 @@ function makeA(a) { a.addEventListener("click", function(e) { var d = a.href.split("/"); var file = d[d.length - 1]; - file.split("#"); - var f = d[d.length - 1]; - if (f[1] != undefined) { + f = file.split("#")[1]; + + if (f != undefined) { e.preventDefault(); f = f.replace(/\#/g,""); var target = document.getElementById(f);