Devi accedere o registrarti per continuare.

dlEHAuto

English: Add a download button with white arrow icon and green background on each link in the gallery list page of e-hentai gallery and ex-hentai. Click on it will download the archive of this gallery without payment confirm. Click on the "Archive Download" link on the galleary page will also start the automatic download progress. 中文:在易恒泰画廊以及EX的列表页中,在每一行作品链接后添加一个绿底白箭头,点击这个链接会进入自动下载压缩文件流程(不会询问是否确认支付C,GP等),另外,在每一个作品页,以点击下载压缩文件的操作启动自动下载压缩文件的流程(不询问是否确认支付同上)

As of 2016-08-07. See the latest version.

  1. // ==UserScript==
  2. // @name dlEHAuto
  3. // @namespace http://dlEHAuto.Satoshi/
  4. // @version 0.11
  5. // @description English: Add a download button with white arrow icon and green background on each link in the gallery list page of e-hentai gallery and ex-hentai. Click on it will download the archive of this gallery without payment confirm. Click on the "Archive Download" link on the galleary page will also start the automatic download progress. 中文:在易恒泰画廊以及EX的列表页中,在每一行作品链接后添加一个绿底白箭头,点击这个链接会进入自动下载压缩文件流程(不会询问是否确认支付C,GP等),另外,在每一个作品页,以点击下载压缩文件的操作启动自动下载压缩文件的流程(不询问是否确认支付同上)
  6. // @require https://code.jquery.com/jquery-1.9.0.js
  7. // @include /http[s]?\:\/\/exhentai.org\/.*/
  8. // @include /http[s]?\:\/\/g.e-hentai.org\/.*/
  9. // @include /http:\/\/\d{1,3}(\.\d{1,3}){3}\/archive\/\d*\/\w*/
  10. // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
  11. // @copyright 2015.08.20 Satoshi
  12. // ==/UserScript==
  13.  
  14. //switch true -> gallery page will close after archive auto click when download start on the list page
  15. // false -> gallery page will not close after archive auto click when download start on the list page
  16. isGalleryPageAutoClose = localStorage.getItem("isGalleryPageAutoClose");
  17. //switch true -> advance option will show automatically and check some checkbox when list page load
  18. // false -> advance option will not show automatically
  19. isAutoCheck = localStorage.getItem("isAutoCheck");
  20. defaultDownload = localStorage.getItem("defaultDownload");
  21. if(isBlank(isGalleryPageAutoClose)){
  22. isGalleryPageAutoClose = "false";
  23. localStorage.setItem("isGalleryPageAutoClose",isGalleryPageAutoClose);
  24. }
  25. if(isBlank(isAutoCheck)){
  26. isAutoCheck = "false";
  27. localStorage.setItem("isAutoCheck",isAutoCheck);
  28. }
  29. if(isBlank(defaultDownload)){
  30. defaultDownload = "Download Original Archive";// localStorage.setItem("defaultDownload","Download Resampled Archive")
  31. localStorage.setItem("defaultDownload",defaultDownload);
  32. }
  33. function isBlank(str){
  34. return str === null || str === "";
  35. }
  36. function checkForm(){
  37. jQuery("#adv13").attr("checked","checked");
  38. jQuery("#adv15").attr("checked","checked");
  39. jQuery("#adv22").attr("checked","checked");
  40. jQuery("#adv31").attr("checked","checked");
  41. }
  42. function tabClose(){
  43. window.opener = null;
  44. window.open('','_self');
  45. window.close();
  46. }
  47. jQuery().ready(function(){
  48. jQuery.noConflict();
  49. var loc = window.location.href;
  50. var link = jQuery(".it5 > a");
  51. if(JSON.parse(isAutoCheck)){
  52. jQuery("p.nopm > a[onclick^='toggle_advsearch_pane']").on("click",function(){
  53. setTimeout(checkForm,20);
  54. });
  55. if(/http[s]?:\/\/exhentai.org\/(\?.*)?/.test(loc) || /http[s]?:\/\/g.e-hentai.org\/(\?.*)?/.test(loc)){
  56. if(jQuery("#advdiv > table").length === 0){
  57. jQuery("p.nopm > a[onclick^='toggle_advsearch_pane']").click();
  58. }
  59. checkForm();
  60. }
  61. }
  62. if(link.length > 0){
  63. link.each(function(){
  64. var it3 = jQuery("<div/>",{class:"it3"});
  65. var i = jQuery("<div/>",{class:"i"});
  66. var href = jQuery(this).attr("href");
  67. var a = jQuery("<a/>",{rel:"nofollow",href:href}).click(function(e){
  68. window.localStorage.setItem(href,true);
  69. });
  70. var icon = jQuery("<img/>",{src:"http://ehgt.org/g/t.png",class:"n",alt:"T"});
  71. var auto = it3.append(i.append(a.append(icon)));
  72. jQuery(this).parent().after(auto);
  73. });
  74. }
  75. else if(loc.match(/http[s]?\:\/\/[^\/]*\/g\/\d*\/[^\/]*\//) !== null){
  76. if(window.localStorage.getItem(loc) !== null && window.localStorage.getItem(loc)){
  77. window.localStorage.removeItem(loc);
  78. jQuery(".g2.gsp").children('a').eq(0).click();
  79. if(JSON.parse(isGalleryPageAutoClose)){
  80. tabClose();
  81. }
  82. }
  83. }
  84. else if(jQuery(".stdbtn").length > 0 && (/http[s]?:\/\/exhentai.org\/archiver.php.*/.test(loc) || /http[s]?:\/\/g.e-hentai.org\/archiver.php.*/.test(loc))){
  85. jQuery(".stdbtn[value='"+window.localStorage.getItem("defaultDownload")+"']").click();
  86. }
  87. else if(jQuery("#db > p > a").length > 0){
  88. if("Click Here To Start Downloading"==jQuery("#db > p > a").text()){
  89. jQuery("#db > p > a").get(0).click();
  90. setTimeout(tabClose,60000);
  91. }
  92. }
  93. });