kp4jd2

Generate a list of links for JD2 from kemono.party posts. Package name included at end for easier copy-pasta, and you should set up Packagizer so the images sort properly (ie. <jd:indexof>_<jd:orgfilename>)

2022-03-17 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

  1. // ==UserScript==
  2. // @name kp4jd2
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Generate a list of links for JD2 from kemono.party posts. Package name included at end for easier copy-pasta, and you should set up Packagizer so the images sort properly (ie. <jd:indexof>_<jd:orgfilename>)
  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. srcList += $(".post__title").text();
  31. navigator.clipboard.writeText(srcList);
  32.  
  33. $(".kpdlh").append("<span class='kpdlfb'>List copied to Clipboard.</span>");
  34. $(".kpdlfb").css("margin-left","0.5rem");
  35. setTimeout(function() {
  36. $(".kpdlfb").fadeOut(500, function() {
  37. $(".kpdlfb").remove()});
  38. }, 2000);
  39. }
  40. });
  41. })();