2023获取ss号

获取SS号

  1. // ==UserScript==
  2. // @name 2023获取ss号
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 获取SS号
  6. // @author
  7. // @match http://book.gzlib.org/views/*
  8. // @match http://www.ucdrs.superlib.net/*
  9. // @match http://book.ucdrs.superlib.net/views/*
  10. // @match https://book.duxiu.com/bookDetail.jsp?*
  11. // @grant GM_xmlhttpRequest
  12. // @license 吾爱破解
  13. // ==/UserScript==
  14.  
  15.  
  16. setTimeout(function () {
  17. var lt_url = window.location.href;
  18. var img_herf;
  19. try {
  20. img_herf = document.getElementsByClassName('testimg')[0].getElementsByTagName('a')[0].getAttribute('href');
  21. } catch {
  22. try{
  23. img_herf = document.getElementsByClassName('link')[0].getElementsByTagName('a')[0].getAttribute('href');
  24. }
  25. catch {
  26. img_herf = document.getElementsByClassName('bnt_content')[0].getElementsByTagName('a')[0].getAttribute('href');
  27. }
  28. }
  29. var reg = /\/.*?(?=')/;
  30. var url;
  31. if (lt_url.indexOf("ucdrs") !== -1) {
  32. url = "http://book.ucdrs.superlib.net/" + img_herf.match(reg);
  33. } else if (lt_url.indexOf("gzlib") !== -1) {
  34. url = "http://book.gzlib.org/" + img_herf.match(reg);
  35. } else if (lt_url.indexOf("duxiu") !== -1) {
  36. img_herf = document.getElementsByClassName('bnt_content')[0].getElementsByTagName('a')[0].getAttribute('href');
  37. url = "http://book.duxiu.com/" + img_herf.match(reg);
  38. }
  39. GM_xmlhttpRequest({
  40. url: url,
  41. method: "GET",
  42. onload: function (xhr) {
  43. var ssurl = xhr.finalUrl;
  44. var ssreg = /\d{8}(?=\/)/;
  45. var ssno = ssurl.match(ssreg);
  46. window.bookssno = ssno;
  47. sentback(ssno);
  48. }
  49. });
  50.  
  51. function sentback(ssno) {
  52. const online = document.getElementsByClassName("tubookimg")[0];
  53. const ss_div = document.createElement('div');
  54. ss_div.className = 'ssno';
  55. ss_div.innerHTML = '<span><font color="blue" size="16">SS:' + window.bookssno + '</font></span>';
  56.  
  57. if (online==undefined){
  58. const online1 = document.getElementsByClassName("card_pic leftF")[0];
  59. online1.insertAdjacentElement('afterend', ss_div);
  60. }else{
  61. online.insertAdjacentElement('afterend', ss_div);
  62. }
  63. }
  64. // Your code here...
  65. }, 1000);

QingJ © 2025

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