miniflux/ui/static/js/link_state_handler.js

11 lines
367 B
JavaScript
Raw Normal View History

class LinkStateHandler {
static flip(element) {
let labelElement = document.createElement("span")
labelElement.className = "link-flipped-state";
labelElement.appendChild(document.createTextNode(element.dataset.labelNewState));
element.parentNode.appendChild(labelElement);
element.parentNode.removeChild(element);
}
}