// ==UserScript== // @name Kobo Detrashify // @description Removes the really trashy novels from Kobo // @version 1 // @grant none // @include https://kobo.com/* // @include https://*.kobo.com/* // @namespace https://greasyfork.org/users/319769 // @downloadURL none // ==/UserScript== // Are we in edit mode? let url = new URL(window.location); let edit = url.searchParams.get('edit'); const EDIT_MODE = edit != null; console.log(EDIT_MODE); // Check and see if we should update our list let myStorage = window.localStorage; let authorSet = myStorage.getItem('KD-authors'); console.log(authorSet); if (authorSet == null || true) { console.log('help'); authorSet = [ 'Victoria Pinder', 'Nina Levine', 'Ramona Gray', 'Dale Mayer', 'Donna Grant', 'Kendall Ryan', 'Rebecca Zanetti', 'Alyssa Drake', 'Lori Foster', 'Vella Day', 'Elizabeth Kelly', 'Meghan March', 'Blair Babylon', 'Tessa Layne', 'Bethany Lopez', 'Lynn Raye Harris', 'Lane Lynn Vale', 'Lani Lynn Vale', 'S.E. Smith', 'Carly Phillips', 'Kylie Gilmore', 'Manda Collins', 'Katie Reus', 'K.A. Linde', 'Cynthia Wright', 'Vi Keeland', 'Natasha Madison', 'Adriana Anders', 'Kelly Bowen', 'Joanna Shupe', 'Sophie Barnes', 'Elizabeth Hoyt', 'Maya Rodale' ]; myStorage.setItem('KD-authors', JSON.stringify(authorSet)); authorSet = new Set(authorSet); } else { authorSet = new Set(JSON.parse(authorSet)); } function addAuthor() { console.log("asdf"); console.log("add author!", this); } deletThis(document.querySelectorAll('.item-container')); deletThis(document.querySelectorAll('.book')); function deletThis(books) { for (let i = 0; i