Quick drop titles

Adds a dropped button to the quick tab for anilist

  1. // ==UserScript==
  2. // @name Quick drop titles
  3. // @namespace Anilist.co Scripts
  4. // @match https://anilist.co/search/anime
  5. // @grant none
  6. // @version 1.0
  7. // @author KiD Fearless
  8. // @license MIT
  9. // @description Adds a dropped button to the quick tab for anilist
  10. // ==/UserScript==
  11.  
  12.  
  13. document.onreadystatechange = () =>
  14. {
  15. document.onreadystatechange = null;
  16. setInterval(() =>
  17. {
  18. let cards = document.querySelectorAll(".media-card");
  19. for(let card of cards)
  20. {
  21. let actions = card.querySelector(".quick-actions");
  22.  
  23. // cheap check if we've already ran
  24. if(actions.lastElementChild.onclick)
  25. {
  26. continue;
  27. }
  28.  
  29. let vue = card.__vue__;
  30.  
  31. // don't know if this changes between updates. Just grab it dynamically
  32. let data = `data-v-${Object.keys(actions.dataset)[0].substring(1).toLowerCase()}`;
  33.  
  34. actions.innerHTML +=
  35. `<div ${data}="" label="Add to Dropped" class="btn">
  36. <svg ${data}="" aria-hidden="true" focusable="false" data-prefix="fas" class="icon svg-inline--fa fa-w-14" data-icon="calendar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path ${data}="" fill="currentColor"d="M135.2 17.69C140.6 6.848 151.7 0 163.8 0H284.2C296.3 0 307.4 6.848 312.8 17.69L320 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H128L135.2 17.69zM394.8 466.1C393.2 492.3 372.3 512 346.9 512H101.1C75.75 512 54.77 492.3 53.19 466.1L31.1 128H416L394.8 466.1z"/></svg>
  37. </div>`;
  38.  
  39. actions.lastElementChild.onclick = (event) =>
  40. {
  41. event.preventDefault();
  42. vue.$store.dispatch("medialistEditor/save", {status: "DROPPED", mediaId: vue.media.id});
  43. };
  44. }
  45. }, 300);
  46. };
  47.  

QingJ © 2025

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