update.eternae.ink/assets/ts/external_links.ts

12 lines
323 B
TypeScript
Raw Normal View History

2020-04-23 18:07:39 +02:00
import feather from "feather-icons";
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('a[target="_blank"]').forEach(el => {
if (!el.classList.contains('no-icon')) {
el.innerHTML += `<i data-feather="external-link"></i>`;
}
2020-04-23 18:07:39 +02:00
});
feather.replace();
2020-09-23 13:30:48 +02:00
});