tools / commit
all MD links now open in a new tab
separator-page/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/separator-page/index.html b/separator-page/index.html index cfaecda..eda857e 100644 --- a/separator-page/index.html +++ b/separator-page/index.html @@ -558,6 +558,12 @@ technically *some* scripts can get your local separator page info descriptionElement.style.height = `${descriptionElement.scrollHeight}px`; const html = converter.makeHtml(description); descriptionRendered.innerHTML = html; + // update all rendered links to open in a new tab + const links = descriptionRendered.querySelectorAll("a"); + links.forEach(link => { + link.setAttribute("target", "_blank"); + link.setAttribute("rel", "noopener noreferrer"); + }); } function handleIconChange(iconUrl) {