一键认领

一键认领,支持猫站、观众

  1. // ==UserScript==
  2. // @name 一键认领
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2.2
  5. // @description 一键认领,支持猫站、观众
  6. // @license MIT
  7. // @author AisukaYuki
  8. // @match https://pterclub.com/userdetails.php*
  9. // @match https://pterclub.com/getusertorrentlist.php*
  10. // @match https://audiences.me/usertorrentlist.php*
  11. // @match https://audiences.me/userdetails.php*
  12. // @require https://gf.qytechs.cn/scripts/453166-jquery/code/jquery.js?version=1105525
  13.  
  14. // @icon https://www.google.com/s2/favicons?sz=64&domain=pterclub.com
  15. // @grant none
  16.  
  17. // ==/UserScript==
  18. (function() {
  19. 'use strict';
  20. /* globals jQuery, $, waitForKeyElements */
  21. var claim_btn = $('<input>', {
  22. id: 'claim_btn_act',
  23. type: 'button',
  24. value: '一键认领',
  25. style: 'margin-Left:5px'
  26. });
  27.  
  28. var currentURL = window.location.href;
  29.  
  30. if (currentURL.includes('userdetails')) {
  31. $('#ka1').before(claim_btn);
  32. } else if (currentURL.includes('torrentlist')) {
  33. $('#outer p:first').after(claim_btn);
  34. }else {
  35. console.log('找不到元素');
  36. }
  37.  
  38.  
  39. function act_CAT() {
  40. var list = $('.claim-confirm');
  41. list.each(function() {
  42. var url = 'https://pterclub.com/' + $(this).data('url');
  43. console.log(url);
  44. $.get(url);
  45. });
  46. }
  47.  
  48. function act_AUD() {
  49. var list = $("span:contains(认领种子)");
  50. list.each(function() {
  51. console.log($(this).attr('id'));
  52. var url = 'https://audiences.me/claim.php?act=add&tid=' + $(this).attr('id').match(/(\d+)/)[0];
  53. console.log(url);
  54. $.get(url);
  55. });
  56. }
  57.  
  58. function act() {
  59. if (currentURL.includes("pterclub.com")) {
  60. act_CAT();
  61. } else if (currentURL.includes("audiences.me")) {
  62. act_AUD();
  63. } else {
  64. console.log("暂不支持该站。");
  65. }
  66. }
  67. claim_btn.on('click',
  68. function() {
  69. var ka1 = $('#ka1').css('display');
  70. if (ka1 === 'none') {
  71. alert('请先展开做种列表。');
  72. } else {
  73. alert('开始执行,F12打开控制台,查看网络日志,等待响应完毕。');
  74. act();
  75. alert('完成');
  76. location.reload();
  77. }
  78. });
  79. })();

QingJ © 2025

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