Manga OnlineViewer Fluid Mode + Lewd Extender

Extension for Manga OnlineViewer Fluid Mode + for 18+ sites, allowing double-page spread viewing for halved images. Sites: Fakku, HBrowse, doujin-moe, hentai2read, luscious, wondersluts,hentaimangaonline, exhentai/g.e-hentai, pururin, hentai4manga, doujinshihentai, hitomi, nhentai, hentaihere, 8muses, Tsumino etc.

  1. // ==UserScript==
  2. // @name Manga OnlineViewer Fluid Mode + Lewd Extender
  3. // @description Extension for Manga OnlineViewer Fluid Mode + for 18+ sites, allowing double-page spread viewing for halved images. Sites: Fakku, HBrowse, doujin-moe, hentai2read, luscious, wondersluts,hentaimangaonline, exhentai/g.e-hentai, pururin, hentai4manga, doujinshihentai, hitomi, nhentai, hentaihere, 8muses, Tsumino etc.
  4. // @version 11.17b6
  5. // @date 2015-11-15
  6. // @author Tago & sneezemonkey
  7. // @namespace https://greasyfork.org/users/1849-tago
  8. // @require http://code.jquery.com/jquery-2.1.1.min.js
  9. // @require https://greasyfork.org/scripts/10000-manga-onlineviewer-fluid-mode/code/Manga%20OnlineViewer%20Fluid%20Mode%20+.user.js
  10. // @grant GM_getValue
  11. // @grant GM_setValue
  12. // @include /https?://www.fakku.net/.+/.+/
  13. // @include /http://www.hbrowse.com/.+/
  14. // @include /http://www.doujin-moe.us/.+/
  15. // @include /http://hentai2read.com/.+/.+//
  16. // @include /http://luscious.net/c/.+/
  17. // @include /http://www.wondersluts.com/.+/
  18. // @include /http://hentaimangaonline.com/image/.+//
  19. // @include /http://exhentai.org/s/.+/.+/
  20. // @include /http://g.e-hentai.org/s/.+/.+/
  21. // @include /http://pururin.com/view/.+/.+/.+/
  22. // @include /http://hentai4manga.com/hentai_manga/.+/.+/
  23. // @include /http://doujinshihentai.com/manga/index.php/.+/
  24. // @include /http://hitomi.la/reader/.+/
  25. // @include /http://nhentai.net/g/.+/.+/
  26. // @include /http://www.8muses.com/picture/.+/.+/.+/.+/
  27. // @include /http://hentaihere.com/m/.+/.+/.+/
  28. // @include /http://tsumino.com/Home/Read/.+/
  29. // @history 11.17 Initial Split with 11.17
  30. // ==/UserScript==
  31.  
  32. //OnlineViewer
  33. (function ($) {
  34. var m = [
  35. // == Fakku =======================================================================================================================================
  36. {
  37. name: "Fakku",
  38. url: /fakku.net/,
  39. run: function () {
  40. return {
  41. title: $(".chapter a:eq(1)").text().trim(),
  42. series: $("a.a-series-title:first").attr("href"),
  43. quant: $(".drop option:last").val(),
  44. prev: "#",
  45. next: "#",
  46. data: $("#thumbs img, .current-page").attr("src").replace("thumbs", "images").replace(/[0-9]+(\.thumb)?\.jpg$/, ""),
  47. page: function (i, addImg, addAltImg) {
  48. var str = '' + i;
  49. while (str.length < 3) str = '0' + str;
  50. addImg(i, this.data + str + ".jpg");
  51. }
  52. };
  53. }
  54. },
  55. // == HBrowser ====================================================================================================================================
  56. {
  57. name: "HBrowser",
  58. url: /hbrowse/,
  59. run: function () {
  60. return {
  61. title: $('.listTable td.listLong:first').text().trim(),
  62. series: window.location.href.match(/.+\/[0-9]+\//),
  63. quant: $('td.pageList a, td.pageList strong').length - 1,
  64. prev: $("#chapters + table a.listLink").eq($("#chapters + table a.listLink").index($("#chapters + table a.listLink[href='" + window.location.href + "']")) - 1).attr("href"),
  65. next: $("#chapters + table a.listLink").eq($("#chapters + table a.listLink").index($("#chapters + table a.listLink[href='" + window.location.href + "']")) + 1).attr("href"),
  66. url: function (i) {
  67. var str = '' + i;
  68. while (str.length < 4) str = '0' + str;
  69. return window.location.href + (window.location.href.slice(-1) == "/" ? "": "/") + str;
  70. },
  71. img: 'td.pageImage a img',
  72. before: function () {
  73. $('html > head').append($('<style>#main a:visited, #pageMain a:visited { color: darkred !important; }</style>'));
  74. }
  75. };
  76. }
  77. },
  78. // == Doujin-Moe Non-members ========================================================================================================================
  79. {
  80. name: "DoujinMoeNM",
  81. url: /doujin-moe.us/,
  82. run: function () {
  83. return {
  84. title: $(".title").text(),
  85. series: $(".title a").eq(-2).attr("href"),
  86. quant: $("#gallery > :not(.thumbs)").length,
  87. prev: "#",
  88. next: "#",
  89. data: $("#gallery > djm:not(.thumbs)"),
  90. page: function (i, addImg, addAltImg) {
  91. addImg(i, this.data.eq(i - 1).attr("file"));
  92. }
  93. };
  94. }
  95. },
  96. // == Luscious ========================================================================================================================
  97. {
  98. name: "Luscious",
  99. url: /(luscious|wondersluts)/,
  100. run: function () {
  101. return {
  102. title: $("#main .center h1:first").text().split("|")[0].trim(),
  103. series: "#",
  104. quant: $(".image > a > img").length,
  105. prev: "#",
  106. next: $(".next").attr("href"),
  107. data: $(".image > a > img"),
  108. page: function (i, addImg, addAltImg) {
  109. addImg(i, this.data.eq(i - 1).attr('src').replace(".640x0", ""));
  110. },
  111. before: function () {
  112. var url = window.location.href;
  113. if (url.match("style=blog") && !url.match("position")) {
  114. window.location = url.replace(/page\/[0-9]+.+/, "sorted/position/page/1/?style=blog");
  115. } else if (url.match("/(pictures/album/.*)/id")) {
  116. window.location = url.replace(/(id.*)/, "sorted/position/page/1/?style=blog");
  117. } else {
  118. $('a.cover').each(function () {
  119. var href = $(this).attr('href');
  120. if (href.match("/(pictures/album/.*)/id")) {
  121. $(this).attr('href', href.replace(/(id.*)/, "sorted/position/page/1/?style=blog"));
  122. }
  123. });
  124. }
  125. }
  126. };
  127. }
  128. },
  129. // == HentaiMangaOnline ========================================================================================================================
  130. {
  131. name: "HentaiMangaOnline",
  132. url: /hentaimangaonline/,
  133. run: function () {
  134. return {
  135. title: $(".breadcrumb li:eq(2)").text().trim(),
  136. series: $("ul.breadcrumb li a:eq(2)").attr("href"),
  137. quant: $("select option").length,
  138. prev: "#",
  139. next: "#",
  140. data: $("select").html(),
  141. img: 'a img'
  142. };
  143. }
  144. },
  145. // == ExHentai ========================================================================================================================
  146. {
  147. name: "ExHentai",
  148. url: /(exhentai|e-hentai)/,
  149. run: function () {
  150. return {
  151. title: $("#il h1").text().trim(),
  152. series: $("div#i5 div.sb a").attr("href"),
  153. quant: $(".sn div span:last").text(),
  154. prev: "#",
  155. next: "#",
  156. url: window.location.href,
  157. timer: 3000,
  158. page: function (i, addImg, addAltImg) {
  159. var self = this;
  160. $.ajax({
  161. type: "GET",
  162. url: self.url,
  163. dataType: "html",
  164. async: false,
  165. success: function (html) {
  166. var ref = $(html).find("div#i7 a, #img");
  167. var src = ref.attr(ref.is("img")?"src":"href");
  168. addImg(i,src);
  169. addAltImg(i, src+" ?nl=1");
  170. self.url = $(html).find("#img").parent().attr("href");
  171. }
  172. });
  173. }
  174. };
  175. }
  176. },
  177. // == Pururin ========================================================================================================================
  178. {
  179. name: "Pururin",
  180. url: /pururin/,
  181. run: function () {
  182. return {
  183. title: $(".header-breadcrumbs a:eq(3)").text().trim(),
  184. series: $(".header-breadcrumbs a:eq(3)").attr("href"),
  185. quant: $(".image-pageSelect option").length,
  186. prev: "#",
  187. next: "#",
  188. data: $(".image-pageSelect").html(),
  189. img: "img.b"
  190. };
  191. }
  192. },
  193. // == hentai4manga ========================================================================================================================
  194. {
  195. name: "hentai4manga",
  196. url: /hentai4manga/,
  197. run: function () {
  198. return {
  199. title: $(".category-label").text().trim(),
  200. series: location.href.replace(/\/\d+\//, '/'),
  201. quant: $('select#sl option').size(),
  202. prev: "#",
  203. next: "#",
  204. url: function (i) {
  205. return "../" + i + "/";
  206. },
  207. img: '#textboxContent img'
  208. };
  209. }
  210. },
  211. // == DoujinshiHentai ========================================================================================================================
  212. {
  213. name: "DoujinshiHentai",
  214. url: /doujinshihentai/,
  215. run: function () {
  216. return {
  217. title: $(".category-label").text().trim(),
  218. series: "http://doujinshihentai.com/series.html",
  219. quant: $('#page_last').attr("href").match(/[0-9]+\./),
  220. prev: "#",
  221. next: "#",
  222. data: location.href,
  223. url: function (i) {
  224. var str = '' + i;
  225. while (str.length < 3) str = '0' + str;
  226. return this.data.replace("001.",str+".");
  227. },
  228. img: '.weatimages_bigimage'
  229. };
  230. }
  231. },
  232. // == hitomi ========================================================================================================================
  233. {
  234. name: "hitomi",
  235. url: /hitomi.la/,
  236. run: function () {
  237. return {
  238. title: $("title").text().replace("| Hitomi.la","").trim(),
  239. series: $(".brand").attr("href"),
  240. quant: $("#single-page-select option").length,
  241. prev: "#",
  242. next: "#",
  243. data:$(".img-url"),
  244. page: function (i,addImg, addAltImg) {
  245. console.log("Page " + i);
  246. addImg(i, this.data.eq(i - 1).text());
  247.  
  248. },
  249. };
  250. }
  251. },
  252. // == nHentai ========================================================================================================================
  253. {
  254. name: "nHentai",
  255. url: /nhentai/,
  256. run: function () {
  257. return {
  258. title: $('title').text().split('- Page')[0].trim(),
  259. series: $("div#page-container div a").attr("href"),
  260. quant: $(".num-pages:first").html(),
  261. prev: "#",
  262. next: "#",
  263. url: function (i) {
  264. return "../" + i + "/";
  265. },
  266. img: '#page-container img'
  267. };
  268. }
  269. },
  270. // == 8muses ========================================================================================================================
  271. {
  272. name: "8muses",
  273. url: /8muses/,
  274. run: function () {
  275. return {
  276. title: $('.breadcrumbs li:eq(2) span a').text().trim(),
  277. series: $('.breadcrumbs li:eq(2) span a').attr("href"),
  278. quant: $(".sel:first option").length,
  279. prev: "#",
  280. next: "#",
  281. data: $(".sel:first option"),
  282. img: '#image'
  283. };
  284. }
  285. },
  286. // == Tsumino ========================================================================================================================
  287. {
  288. name: "Tsumino",
  289. url: /tsumino/,
  290. run: function () {
  291. return {
  292. title: $('title').text().split('/')[0].trim(),
  293. series: $("a:contains('RETURN')").attr("href"),
  294. quant: (parseInt($("h1").text().split("of")[1].trim())),
  295. prev: "#",
  296. next: "#",
  297. url: function (i) {
  298. var url = window.location.pathname.split('/');
  299. return "/Image/Page/"+ url[3] + "/" + i;
  300. },
  301. page: function(i,addImg,addAltImg) {
  302. var self = this;
  303. addImg(i, self.url(i))
  304. }
  305. };
  306. }
  307. },
  308. // == hentaihere ========================================================================================================================
  309. {
  310. name: "hentaihere",
  311. url: /hentaihere/,
  312. run: function () {
  313. return {
  314. title: $('title').text().split('|')[1].trim(),
  315. series: $('ul.nav-pills:first li:first a').attr("href"),
  316. quant: $("#pageDropdown:first ul li").length,
  317. prev: "#",
  318. next: "#",
  319. url: function(i) {
  320. var pathname = window.location.pathname.split('/');
  321. return "/" + pathname[1] + "/" + pathname[2] + "/" + pathname[3] + "/" + i + "/";
  322. },
  323. img: 'img#arf-reader-img'
  324. };
  325. }
  326. }
  327. ];
  328.  
  329. if ($(".startbutton").length > 0) {
  330. $(".startbutton").on("click", function(){
  331. $.MangaOnlineViewer.start(m);
  332. $(".startbutton").remove();})
  333. } else {
  334. $.MangaOnlineViewer.start(m);}
  335.  
  336. })(jQuery);