MyShaarli/plugins/readitlater/readitlater.default.js

15 lines
517 B
JavaScript
Raw Normal View History

2023-05-24 11:35:15 +02:00
(() => {
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);
});
}
});
})();