Allow links that are target=_blank to opt-out from the icon

This commit is contained in:
Alice Gaudon 2020-09-05 17:34:26 +02:00
parent 3598f68183
commit c68d5819b1

View File

@ -2,7 +2,9 @@ import feather from "feather-icons";
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('a[target="_blank"]').forEach(el => {
el.innerHTML += `<i data-feather="external-link"></i>`;
if (!el.classList.contains('no-icon')) {
el.innerHTML += `<i data-feather="external-link"></i>`;
}
});
feather.replace();