DTF & VC Comments Expander

Expands dtf.ru & vc.ru all comments by default

目前为 2024-04-18 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name DTF & VC Comments Expander
  3. // @namespace https://tampermonkey.net/
  4. // @version 1.6
  5. // @description Expands dtf.ru & vc.ru all comments by default
  6. // @author Streampunk
  7. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAb1BMVEWF1vAAAQUAAAF4wdkUISiH2vSE1e8PGR8wTlpzudEKERZtr8UOFx1Pf5CC0uxXjJ4pQk0GCg8kO0V/zeZhnLA8YnAzU184W2ksSFNnprtDbXxThpdsrsRAaHYfMjt6xd1clKgXJS1JdoZakaMcLTWbLIFvAAACy0lEQVR4nO3c25KiMBSF4SQQD4iHCAqeQGnf/xmHnrmZC7ZMmaw0Tq3/XuvrVCqtJFEpxhhjjDHGGGOMMcYYY4wxxhh7u9m7KWWt/Rlze1i82bG6re/XdvMD8iQ176d19qi7UxGbnaTaq57umvN1E9Xti/4Dz+oy5nCHQH+73a6MN9qB0D07q5ax1MHQPTvdRhrsgOh+jlTtx6H79qsPRJvn6fPQ/cQuPw/dq/FjHRytzQM+r8Ojtdkn4JUPgNa62nwg2l2wQw1B63QFVWPQ5gidIBi0diVyqEFosys+D63dHTjUKLSpgbP6ffTvL7Zy2Qk31ALa3dZjdVWTvfqbDjCzhM5WdjRVnA65ONrmiftCIKL/5cVWXWtxqIGrnhe6Zxc3Jw31GWX2RSu1uUnoHWz98EarQpohKewTqj/arubDaAdb9PzRSkkTZDtl9FVYr7spo4v94Gptqimj7WEYvQCZw6DXg+9h6tmU0dthNGyhJppoookmmmiiiSaaaKKJJppooi/DaNi2SxD0WXhYM+XnHrNaeCwGModAW+E9zG3Cz/KEKa31esLothne4sLtFAVAd8JA57ATkd5oWwqP1E0D29P3RdtS2qfGLR6eaFushV0iDdxy8dhmVtYWZS1tfWo9xx3yldD35Virsts7+SAC7v+hfHQiy8fKnH51dsJ9RT864R3yEAIMrTucGXbw6oE8uokaadhuLQ5tGug5ewwaesANhQYf60WgTQM+QI1Az4FH8lBoh/ukBEO7DvehA4V2Z/DZegDadXhzYLTJL/C5ERptHhGuEwVGu0WkG4nh0Ca9xLqyGgpt8kO0i59h0EbPq+ss3s1gf/T3HexuFWPR+Av98mT/CLd/bd7cylbFve6eNPn8zdLn/ni+L4v4vyuwSUYfcAglSbv5qd9wGL+wID5iYowxxhhjjDHGGGOMMcYYY4wxxtj/3y9lTEB1QYFbqAAAAABJRU5ErkJggg==
  8. // @match https://dtf.ru/*
  9. // @match https://vc.ru/*
  10. // @run-at document-end
  11. // @grant none
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. setInterval(function() {
  16. const load_all_comments_button = document.querySelector(".comments__show-all");
  17. if(load_all_comments_button) {
  18. load_all_comments_button.click();
  19. clearInterval();
  20. // console.log("Trying expand all comments - vc.ru");
  21. }
  22. else
  23. clearInterval();
  24. // console.log("All comments expanded - vc.ru");
  25. }, 5000);
  26.  
  27. setInterval(function() {
  28. const load_all_comments_button = document.querySelector("#app > div.layout > div.view > div.entry > div.comments.comments--limited > div.comments-limit > button");
  29. if(load_all_comments_button) {
  30. load_all_comments_button.click();
  31. clearInterval();
  32. // console.log("Trying expand all comments - dtf.ru");
  33. }
  34. else
  35. clearInterval();
  36. // console.log("All comments expanded - dtf.ru");
  37. }, 5000);
  38.  
  39. setInterval(function() {
  40. const load_more_comments_button = document.querySelector(".comment__load-more");
  41. if(load_more_comments_button) {
  42. load_more_comments_button.click();
  43. clearInterval();
  44. // console.log("Trying expand replies - vc.ru");
  45. }
  46. else
  47. clearInterval();
  48. // console.log("All replies expanded - vc.ru");
  49. }, 1000);
  50.  
  51. setInterval(function() {
  52. const load_more_comments_button = document.querySelector("#app > div.layout > div.view > div.entry > div.comments > div.comments-tree > div:nth-child(N) > div.comment__content > div.comment__footer > button");
  53. if(load_more_comments_button) {
  54. load_more_comments_button.click();
  55. clearInterval();
  56. // console.log("Trying expand replies - dtf.ru");
  57. }
  58. else
  59. clearInterval();
  60. // console.log("All replies expanded - dtf.ru");
  61. //};
  62. }, 1000);
  63.  
  64. setInterval(function() {
  65. const load_more_comments_button = document.querySelector("#page_wrapper > div.page.page--entry > div.l-island-bg.l-island-round.l-pv-32.lm-pv-20.lm-mt-20.l-mt-28 > div > div.comments__body > div.comments__content_wrapper.comments__content_wrapper--open > div.comments__content_wrapper__container > div.comments__content.l-island-a > div:nth-child(N) > div.comment__content > div.comment__load-more.comment__inline-action");
  66. if(load_more_comments_button) {
  67. load_more_comments_button.click();
  68. clearInterval();
  69. // console.log("Trying expand replies - old dtf.ru");
  70. }
  71. else
  72. clearInterval();
  73. // console.log("All replies expanded - old dtf.ru");
  74. //};
  75. }, 1000);