1
0
Fork 0
cookiedb/userscripts/kobo_easy_archive.user.js

13 Zeilen
953 B
JavaScript

// ==UserScript==
// @name Kobo library easy archive
// @version 0.1
// @source https://gitea.sebastian-tobie.de/sebastian/cookiedb/raw/branch/stable/userscripts/kobo_easy_archive.user.js
// @description Helps with archiving kobo books
// @author Sebastian Tobie
// @run-at document-idle
// @grant none
// @match https://www.kobo.com/de/de/library/books
// @match https://www.kobo.com/de/de/library/books?*
// ==/UserScript==
(()=>{var d=document.getElementsByClassName("headers-end")[0],n=document.createElement("span");n.classList.add("heading");n.classList.add("more-actions");d.appendChild(n);var l=document.getElementsByClassName("library-items")[0];for(let e=0;e<l.childElementCount;e++){let t=l.children[e],a=t.getElementsByClassName("item-bar")[0];if(t.classList.contains("pre-order"))a.appendChild(document.createElement("span"));else{let s=t.getElementsByClassName("remove-from-library")[0];s.parentNode.removeChild(s),a.appendChild(s)}}})();