plugins_public_toc-js.txt 670 B

123456789101112
  1. --- orig/plugins_public/toc.js 1970-01-01 03:00:00
  2. +++ fixed/plugins_public/toc.js 2025-01-08 18:10:46
  3. @@ -24,7 +24,8 @@
  4. function createLink (header) {
  5. var innerText = (header.textContent === undefined) ? header.innerText : header.textContent;
  6. - return "<a class='"+settings.classes.link+"' href='#" + fixedEncodeURIComponent(header.id) + "'>" + innerText + "</a>";
  7. + var href = document.location.href.replace(document.location.hash, '');
  8. + return "<a class='"+settings.classes.link+"' href='" + href + "#" + fixedEncodeURIComponent(header.id) + "'>" + innerText + "</a>";
  9. }
  10. var headers = $(settings.headers).filter(function() {