MyShaarli/plugins/readitlater/readitlater.default.js
2023-05-24 11:35:15 +02:00

14 lines
517 B
JavaScript

(() => {
document.addEventListener('DOMContentLoaded', () => {
const unreadLinks = document.querySelectorAll('.readitlater-unread');
if (unreadLinks) {
const unreadLabel = document.createElement('span');
unreadLabel.className = 'label label-unread';
unreadLabel.innerHTML = ' To Read';
[...unreadLinks].forEach((element) => {
const button = unreadLabel.cloneNode(true);
element.querySelector('.linklist-item-editbuttons').prepend(button);
});
}
});
})();