From afa2e5197064f9eac7086a0025c12d956ef4ed7e Mon Sep 17 00:00:00 2001 From: oupala Date: Thu, 18 Jul 2019 19:03:26 +0200 Subject: [PATCH] fix: remove useless js Remove some old js code which now seems useless. It aimed to fix links when not adding a / at the end of the URI. fix #132 --- apaxy/theme/apaxy.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apaxy/theme/apaxy.js b/apaxy/theme/apaxy.js index 608b377..cc2080a 100644 --- a/apaxy/theme/apaxy.js +++ b/apaxy/theme/apaxy.js @@ -1,13 +1,3 @@ -// fix links when not adding a / at the end of the URI -var uri = window.location.pathname.substr(1); -if (uri.substring(uri.length - 1) !== '/') { - var indexes = document.getElementsByClassName('indexcolname'); - for (let i of indexes) { - var a = i.getElementsByTagName('a')[0]; - a.href = '/' + a.getAttribute('href', 2); - } -} - // content filtering, based on "light javascript table filter" by Chris Coyier // https://codepen.io/chriscoyier/pen/tIuBL - MIT License (function(document) {