Automated comment your JD orders

Enable grease script plugins, and open the orders-to-comment list page, then it will automatic work.

  1. // ==UserScript==
  2. // @name Automated comment your JD orders
  3. // @namespace https://club.jd.com/myJdcomments/
  4. // @version 0.12
  5. // @description Enable grease script plugins, and open the orders-to-comment list page, then it will automatic work.
  6. // @author Patrick Gu
  7. // @match https://club.jd.com/myJdcomments/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. if(window.location.href.indexOf("myJdcomment.action?sort=1")!=-1)
  13. {
  14. setTimeout(function(){
  15. $("a.btn-9").eq(0).click();
  16. },1000);
  17. setTimeout(function(){
  18. $(".img-lists").find("input[name=imgs1]").eq(0).val("http:"+$(".p-img").eq(0).find("img").attr("src"));
  19. $(".img-lists").find("input[name=imgs1]").eq(1).val("http:"+$(".p-img").eq(0).find("img").attr("src"));
  20. },1000);
  21. }
  22. else if(window.location.href.indexOf("myJdcomment.action")!=-1 && window.location.href.indexOf("myJdcomment.action?sort=1")==-1)
  23. {
  24. window.location.href = $("a.btn-def").eq(0).attr("href");
  25. }
  26.  
  27. if(window.location.href.indexOf("orderVoucher.action")!=-1)
  28. {
  29. setTimeout(function(){
  30. $("span.star.star5").addClass("active");
  31.  
  32. $("textarea").html($(".p-name>a").html() + new Date().getSeconds() + new Date().getMilliseconds());
  33.  
  34. $(".tag-item").eq(1).addClass("tag-checked");
  35. $(".tag-item").eq(2).addClass("tag-checked");
  36. $(".btn-submit").click();
  37. },1000);
  38. }
  39.  
  40. if(window.location.href.indexOf("saveCommentSuccess.action")!=-1)
  41. {
  42. window.location.href = "http://club.jd.com/myJdcomments/myJdcomment.action";
  43. }
  44. // Your code here...
  45. })();