kp4jd2

Generate a list of links for JD2 from kemono posts. You should set up a packagizer rule so the images sort properly.

اعتبارا من 17-03-2022. شاهد أحدث إصدار.

  1. // ==UserScript==
  2. // @name kp4jd2
  3. // @namespace https://sleazyfork.org/en/scripts/441628-kp4jd2
  4. // @version 0.21
  5. // @description Generate a list of links for JD2 from kemono posts. You should set up a packagizer rule so the images sort properly.
  6. // @author You
  7. // @match https://kemono.party/*/user/*/post/*
  8. // @icon https://www.google.com/s2/favicons?domain=kemono.party
  9. // @grant none
  10. // @require http://code.jquery.com/jquery-latest.min.js
  11. // @license MIT
  12. // ==/UserScript==
  13. var $ = window.jQuery;
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. $(document).ready(function () {
  19. $(".post__header").after("<div class='kpdlh'></div>");
  20. $(".kpdlh").append(`<button class="kpdl">Generate List for JD2</button>`).css("padding","0.5rem");
  21. $(".kpdl").click(function() {genList();});
  22.  
  23. function genList() {
  24. let srcList = "";
  25. $(".post__files .post__thumbnail a.image-link").each(function() {
  26. let tmtl = $(this).attr("href");
  27. let url = "https://kemono.party"+tmtl;
  28. srcList += url + " ";
  29. });
  30. $(".post__attachment a.post__attachment-link").each(function() {
  31. let tmtl = $(this).attr("href");
  32. let url = "https://kemono.party"+tmtl;
  33. srcList += url + " ";
  34. });
  35.  
  36. srcList += $(".post__title").text();
  37. navigator.clipboard.writeText(srcList);
  38.  
  39. $(".kpdlh").append(`<span class="kpdlfb">List copied to Clipboard.</span>`);
  40. $(".kpdlfb").css("margin-left","0.5rem");
  41. setTimeout(function() {
  42. $(".kpdlfb").fadeOut(500, function() {
  43. $(".kpdlfb").remove()});
  44. }, 2000);
  45. }
  46. });
  47. })();