98浏览助手

直接把帖子列表转成图片浏览,点击图片可以进入帖子,下面6个链接是我经常观看的网址,也可自行添加修改// @include

  1. // ==UserScript==
  2. // @name 98浏览助手
  3. // @namespace https://www.sehuatang.net/
  4. // @description 直接把帖子列表转成图片浏览,点击图片可以进入帖子,下面6个链接是我经常观看的网址,也可自行添加修改// @include
  5. // @author Hulk
  6. // @include https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=37*
  7. // @include https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=151*
  8. // @include https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=104*
  9. // @include https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=38*
  10. // @include https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=36*
  11. // @include https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=103
  12. // @grant GM_xmlhttpRequest
  13. // @require https://code.jquery.com/jquery-3.4.1.min.js
  14. // @version 1.0
  15. // @license GPL-3.0-only
  16. // ==/UserScript==
  17. $(document).ready(function(){
  18. $('.icn').each(function(){
  19. var urls="https://www.sehuatang.net/";
  20. urls+=$(this).find("a").attr("href");
  21. var imgg= $(this).find("img");
  22. var icn_td=$(this);
  23. GM_xmlhttpRequest({
  24. method: 'GET',
  25. url: urls,
  26. headers: {
  27. 'User-agent': 'Mozilla/5.0 Chrome/70. Safari/537.36',
  28. 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
  29. },
  30. onload: function(result) {
  31. var doc = result.responseText;
  32. var img01=$(doc).find(".zoom").attr("file");
  33. $(imgg).attr("src",img01);
  34. var dvi01=$(doc).find(".blockcode");
  35. var dvi02=$(doc).find("#thread_subject");
  36. //console.log($(dvi02).html());
  37. var magnet =$(dvi01).find("li").text();
  38. //console.log(magnet);
  39. $(icn_td).css("width","100%")
  40. $(icn_td).append("<p style='margin-top: 20px;font-size: 2em;'>"+$(dvi02).html()+"</p><br/>");
  41. $(icn_td).append("<p style='margin-top: 20px;font-size: 2em;'>"+magnet+"</p><br/>");
  42. }
  43. });
  44. });
  45. $('.common').each(function(){
  46. $(this).remove();
  47. });
  48. $('.by').each(function(){
  49. $(this).remove();
  50. });
  51. $('.num').each(function(){
  52. $(this).remove();
  53. });
  54. });