AO3: Remove from List

On 'Marked For Later' pages, add a button to remove from list without deleting

  1. // ==UserScript==
  2. // @name AO3: Remove from List
  3. // @version 1.1.1
  4. // @description On 'Marked For Later' pages, add a button to remove from list without deleting
  5. // @author sharkcat
  6. // @namespace https://github.com/sharkcatshark/Userscripts
  7. // @match *://archiveofourown.org/users/*/readings?*show=to-read
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=archiveofourown.org
  9. // @require https://code.jquery.com/jquery-3.7.0.min.js
  10. // @license GNU GPLv3
  11. // ==/UserScript==
  12.  
  13. // Start User Settings
  14. var hideDeleteButton = false; // set to 'true' if you want to hide the 'Delete from History' button from marked for later pages
  15. // End User Settings
  16.  
  17. var workID = 0;
  18. var removeURL = "/works/" + workID + "/mark_as_read";
  19.  
  20. $( ".reading .work" ).each( function( index, element ){ // for each work
  21. workID = $( this ).attr('id').replace(/work_/g, ""); // get work id
  22. removeURL = "/works/" + workID + "/mark_as_read"; // put into replace url
  23. $(this).find('ul.actions').append("<li><a href='" + removeURL + "'>Remove from List</a></li>"); // add button
  24.  
  25. if (hideDeleteButton) { // if true
  26. $(this).find(".actions li").eq(0).remove();
  27. };
  28. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址