Skip to content

Commit

Permalink
Fix links for new page creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbynek Konecny committed Dec 12, 2024
1 parent 93480f1 commit df62475
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui-bundle/partials/footer-scripts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
.then(rsp=>rsp.text())
.then(text=> {
document.querySelectorAll('.newlink').forEach(link => {
link.href += "?value=" + encodeURIComponent(text);
const url = new URL(link.href);
url.searchParams.set("value", text)
link.href = url.toString();
link.style.display = '';
})
});
Expand Down

0 comments on commit df62475

Please sign in to comment.