8Comic.com image list

Lists all images in a chapter/volume

当前为 2019-09-28 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name 8Comic.com image list
  3. // @description Lists all images in a chapter/volume
  4. // @name:zh-TW 8Comic 漫畫列表
  5. // @description:zh-TW 列出章節內所有圖片
  6. // @version 1.6.6
  7. // @include /^https?\:\/\/.*?\.comicvip\.com\/show\//
  8. // @include /^https?\:\/\/.*?\.comicbus\..*\//
  9. // @include /^https?\:\/\/.*?\.nowcomic\.com\//
  10. // @include /^https?\:\/\/.*?\.comicgood\.com\//
  11. // @include /^https?\:\/\/.*?\.8899\.click\//
  12. // @include /^https?\:\/\/.*?\/online\/manga_\d*.html/
  13. // @author willy_sunny
  14. // @license GPL version 2 or any later version; http://www.gnu.org/licenses/gpl-2.0.txt
  15. // @namespace https://greasyfork.org/users/9968
  16. // ==/UserScript==
  17. //
  18. // ************************
  19. // Own Variable Declaration
  20. // ************************
  21. // imgList: the output result
  22. //
  23. // ***********************************
  24. // Site function/variable Declearation
  25. // many can be found in the nview.js
  26. // http://new.comicvip.com/js/nview.js
  27. // ***********************************
  28. //
  29. // ps: total page count, it's also auto stored when nview.js was done loading
  30. //
  31.  
  32. var imgList = "";
  33. var encStr=document.getElementById('TheImg').src.split("_")[1].substr(0,3);
  34. var encPos=0;
  35. var ch=request("ch");var p=1;if(ch.indexOf("-")>0) {p=parseInt(ch.split('-')[1]);ch=ch.split('-')[0];}
  36. while(su(lc(su(cs,i*y+encPos, 40)), mm(p),3)!=encStr){encPos +=2;if(encPos>cs.length){console.log("over limit");return;}} // Reverse Engineer the encode string to find the location
  37. var imgRoot=document.getElementById('TheImg').src.substr(0,document.getElementById('TheImg').src.lastIndexOf("/")+1); // server root is always the same
  38. for (var p = 1; p <= ps; p++) {
  39. var picUrl = imgRoot + nn(p) + '_' + su(lc(su(cs,i*y+encPos,40)), mm(p), 3) + '.jpg';
  40. imgList = imgList + '<a href="'+picUrl+'"><img src="'+picUrl+'"></a><br>';
  41. }
  42. imgList += '<a href="#" onClick="jv(ni)">Next >>'; // this enables the user to click the next chapter link on the bottom to follow to the next chapter
  43. document.write("<center>"+imgList+"</center>"); // outputs the list