Skip to content

Commit

Permalink
now able to link internal files
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTplayed committed May 11, 2019
1 parent e20c5c4 commit 7ec1abd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ldf.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ var ldf = {
},
updatePageLinks: function () {
document.querySelectorAll("a").forEach(function (a) {
if (a.href && (a.href.includes(location.href.split("#")[0]) || a.href == "/")) {
var className = a.className;
var href = a.href;
if (className.includes("ldfignore")) return;
if (className.includes("ldfinclude") || (href && (href.includes(location.href.split("#")[0]) || href == "/") && !href.split("/").pop().match(/\.(?!html)/))) {
a.removeEventListener("click", ldf.helpers.listener);
a.addEventListener("click", ldf.helpers.listener);
}
Expand Down

0 comments on commit 7ec1abd

Please sign in to comment.