web漫画にショートカットキーを追加

←→:前/次のページ Shift+A:頭出しオンオフ f [:全画面化 Shift+←→か ] Enter:前の話/次の話に移動 Shift+↑:作品情報ページに戻る (ニコニコ静画のみ)C:コメントオンオフ (作品情報ページで)→:第1話に移動、Enter:最新話に移動、Shift+↑:パンくずリスト1つ上に移動 Shift+@:インスタントsibling登録

От 27.01.2025. Виж последната версия.

  1. // ==UserScript==
  2. // @name web漫画にショートカットキーを追加
  3. // @description ←→:前/次のページ Shift+A:頭出しオンオフ f [:全画面化 Shift+←→か ] Enter:前の話/次の話に移動 Shift+↑:作品情報ページに戻る (ニコニコ静画のみ)C:コメントオンオフ (作品情報ページで)→:第1話に移動、Enter:最新話に移動、Shift+↑:パンくずリスト1つ上に移動 Shift+@:インスタントsibling登録
  4. // @version 0.1.84
  5. // @run-at document-idle
  6. // @match *://www.comic-valkyrie.com/*
  7. // @match *://webcomic.ohtabooks.com/*
  8. // @match *://comicride.jp/*
  9. // @match *://*.5ch.net/*
  10. // @match *://*.yucl.net/*
  11. // @match *://arklightbooks.com/comics/*
  12. // @match *://bokete.jp/*
  13. // @match *://cakes.mu/*
  14. // @match *://cho-animedia.jp/comic_category/*
  15. // @match *://cho-animedia.jp/comic/*
  16. // @match *://ci.nii.ac.jp/*
  17. // @match *://comic-days.com/episode/*
  18. // @match *://tonarinoyj.jp/episode/*
  19. // @match *://shonenjumpplus.com/episode/*
  20. // @match *://kuragebunch.com/episode/*
  21. // @match *://pocket.shonenmagazine.com/episode/*
  22. // @match *://viewer.heros-web.com/episode/*
  23. // @match *://comic-fuz.com/*
  24. // @match *://comic-meteor.jp/*
  25. // @match *://comic-trail.jp/*
  26. // @match *://comic-walker.com/detail/KC*
  27. // @match *://comic.mag-garden.co.jp/*
  28. // @match *://comic.pixiv.net/works/*
  29. // @match *://comic.pixiv.net/viewer/*
  30. // @match *://comic.webnewtype.com/contents/*
  31. // @match *://comicawa.com/TitleDetail/*
  32. // @match *://comicpash.jp/*
  33. // @match *://curazy.com/*
  34. // @match *://cycomi.com/fw/cycomibrowser/chapter/*
  35. // @match *://daysneo.com/works/*
  36. // @match *://ebookjapan.yahoo.co.jp/*
  37. // @match *://gammaplus.takeshobo.co.jp/*
  38. // @match *://ganma.jp/*
  39. // @match *://grapee.jp/*
  40. // @match *://hanatsubaki.shiseidogroup.jp/comic*
  41. // @match *://kawaii2ch.com/*
  42. // @match *://leedcafe.com/*
  43. // @match *://manga-park.com/title/*
  44. // @match *://manga.line.me/*
  45. // @match *://mangacross.jp/comics/*
  46. // @match *://mangahack.com/comics/*
  47. // @match *://matogrosso.jp/*
  48. // @match *://news.mynavi.jp/series/*
  49. // @match *://news.mynavi.jp/article/*
  50. // @match *://note.mu/*
  51. // @match *://online.ichijinsha.co.jp/*
  52. // @match *://rookie.shonenjump.com/series/*
  53. // @match *://rookie.shonenjump.com/users/*
  54. // @match *://ruijianime.com/*
  55. // @match *://sai-zen-sen.jp/comics/twi4/*
  56. // @match *://manga.nicovideo.jp/watch/*
  57. // @match *://manga.nicovideo.jp/comic/*
  58. // @match *://manga.nicovideo.jp/manga/list?user_id=*
  59. // @match *://souffle.life/author/*
  60. // @match *://souffle.life/manga/*
  61. // @match *://storia.takeshobo.co.jp/manga/*
  62. // @match *://sukupara.jp/*
  63. // @match *://to-ti.in/*
  64. // @match *://urasunday.com/*
  65. // @match *://watamote.com/*
  66. // @match *://web-ace.jp/*
  67. // @match *://webcomicgamma.takeshobo.co.jp/*
  68. // @match *://webcomics.jp/*
  69. // @match *://www.alphapolis.co.jp/manga/*
  70. // @match *://www.comic-earthstar.jp/*
  71. // @match *://www.comic-essay.com/episode/*
  72. // @match *://www.comic-essay.com/neko/*
  73. // @match *://www.comic-essay.com/read/*
  74. // @match *://www.comic-essay.com/links/*
  75. // @match *://www.comicbunch.com/manga/*
  76. // @match *://www.comico.jp/challenge/*
  77. // @match *://www.comico.jp/articleList*
  78. // @match *://www.comico.jp/detail*
  79. // @match *://www.comico.jp/challenge/detail*
  80. // @match *://www.ebigcomic4.jp/title/*
  81. // @match *://www.ganganonline.com/*
  82. // @match *://www.jstage.jst.go.jp/*
  83. // @match *://www.mangabox.me/reader/*
  84. // @match *://www.moae.jp/comic/*
  85. // @match *://*.moae.jp/lineup/*
  86. // @match *://www.nicovideo.jp/search/*
  87. // @match *://www.sunday-webry.com/episode*
  88. // @match *://www.tatan.jp/*
  89. // @match *://www.zenyon.jp/lib/*
  90. // @match *://yasudadou.futene.net/*
  91. // @match *://yawaspi.com/*
  92. // @match *://yomitai.jp/*
  93. // @match *://yusb.net/*
  94. // @match *://comic-boost.com/*
  95. // @match *://futabanet.jp/*
  96. // @match *://hobbyjapan.co.jp/*
  97. // @match *://comip.jp/*
  98. // @match *://comic-action.com/episode/*
  99. // @match *://www.comic-ryu.jp/*
  100. // @match *://ashitano.tonarinoyj.jp/*
  101. // @match *://debut.shonenmagazine.com/*
  102. // @match *://medibang.com/*
  103. // @match *://mangalifewin.takeshobo.co.jp/*
  104. // @match *://nikkangecchan.jp/*
  105. // @match *://www.mangabox.me/special/*
  106. // @match *://www-indies.mangabox.me/*
  107. // @match *://www.gamespark.jp/*
  108. // @match *://kodansha-cc.co.jp/*
  109. // @match *://kinmaweb.jp/*
  110. // @match *://pachikuri.jp/*
  111. // @match *://comici.jp/*
  112. // @match *://magazine.comici.jp/*
  113. // @match *://ebookstore.corkagency.com/*
  114. // @match *://books.vipdoor.info/*
  115. // @match *://mankai.jp/*
  116. // @match *://cbiz.shueisha.co.jp/*
  117. // @match *://comic-gardo.com/episode/*
  118. // @match *://sokuyomi.jp/*
  119. // @match *://comic-polaris.jp/*
  120. // @match *://www.yatate.net/*
  121. // @match *://sonorama.asahi.com/*
  122. // @match *://csbs.shogakukan.co.jp/book*
  123. // @match *://comic-medu.com/*
  124. // @match *://comic-zenon.com/episode/*
  125. // @match *://sportsbull.jp/*
  126. // @match *://magcomi.com/episode/*
  127. // @match *://omocoro.jp/writer*
  128. // @match *://www.sukima.me/*
  129. // @match *://ddnavi.com/serial/*
  130. // @match *://www.gentosha.jp/series/*
  131. // @match *://www.gentosha.jp/article/*
  132. // @match *://crea.bunshun.jp/*
  133. // @match *://booklive.jp/*
  134. // @match *://kansai.mag-garden.co.jp/*
  135. // @match *://getnavi.jp/*
  136. // @match *://mavo.takekuma.jp/*
  137. // @match *://curazy.com/manga/*
  138. // @match *://margaretbookstore.com/*
  139. // @match *://4komagram.com/*
  140. // @match *://kidsna.com/*
  141. // @match *://dot.asahi.com/*
  142. // @match *://animesoku.com/*
  143. // @match *://www.lezhin.com/*
  144. // @match *://j-nbooks.jp/*
  145. // @match *://www.cmoa.jp/*
  146. // @match *://www.mangaz.com/*
  147. // @match *://vw.mangaz.com/*
  148. // @match *://sp.comics.mecha.cc/*
  149. // @match *://bigcomicbros.net/*
  150. // @match *://bookwalker.jp/*
  151. // @match *://comic.k-manga.jp/*
  152. // @match *://pokeman.jp/*
  153. // @match *://static.ichijinsha.co.jp/*
  154. // @match *://piccoma.com/*
  155. // @match *://oshiete.goo.ne.jp/watch/*
  156. // @match *://www.comicgum.com/*
  157. // @match *://kuzure.but.jp/*
  158. // @match *://comic.mf-fleur.jp/*
  159. // @match *://*.2chan.net/*
  160. // @match *://*.ftbucket.info/scrapshot/*
  161. // @match *://*.ftbucket.info/*/cont/*
  162. // @match *://note.com/*
  163. // @match *://sp.handycomic.jp/*
  164. // @match *://ebookstore.sony.jp/*
  165. // @match *://kc.kodansha.co.jp/*
  166. // @match *://jumpsq.shueisha.co.jp/*
  167. // @match *://sp.comics.mecha.cc/*
  168. // @match *://wanibooks-newscrunch.com/*
  169. // @match *://renta.papy.co.jp/*
  170. // @match *://yanmaga.jp/*
  171. // @match *://mankai.jp/*
  172. // @match *://yuik.net/*
  173. // @match *://yuk2.net/*
  174. // @match *://yakb.net/*
  175. // @match *://togetter.com/*
  176. // @match *://pash-up.jp/*
  177. // @match *://*.fanbox.cc/posts/*
  178. // @match *://pie.co.jp/*
  179. // @match *://manga-5.com/*
  180. // @match *://feelweb.jp/episode/*
  181. // @match *://www.123hon.com/*
  182. // @match *://novema.jp/*
  183. // @match *://www.comicnettai.com/*
  184. // @match https://digitalmargaret.jp/detail/*
  185. // @match https://digitalmargaret.jp/contents/*
  186. // @match *://comicborder.com/*
  187. // @match *://i-voce.jp/*
  188. // @match *://inthelife.club/*
  189. // @match *://konomanga.jp/*
  190. // @match *://www.pixiv.net/*
  191. // @match *://firecross.jp/*
  192. // @match *://corocoro.jp/*
  193. // @match *://www.mishimaga.com/*
  194. // @match *://bunshun.jp/*
  195. // @match *://my-best.com/*
  196. // @match *://the360.life/*
  197. // @match *://boards.4channel.org/*
  198. // @match *://shonenjumpplus.com/*
  199. // @match *://game.asahi.com/*
  200. // @match *://twitter.com/*
  201. // @match *://mobile.twitter.com/*
  202. // @match *://x.com/*
  203. // @match *://nlab.itmedia.co.jp/*
  204. // @match *://twicomi.com/*
  205. // @match *://7irocomics.jp/*
  206. // @match *://ciao.shogakukan.co.jp/webwork/*
  207. // @match *://write.as/*
  208. // @match *://*.writeas.com/*
  209. // @match *://gaugau.futabanet.jp/*
  210. // @match *://gaugau.futabanex.jp/*
  211. // @match *://michikusacomics.jp/*
  212. // @match *://*.shitaraba.net/bbs/read.cgi/*
  213. // @match *://*.shitaraba.net/bbs/read_archive.cgi/*
  214. // @match *://anige.horigiri.net/*
  215. // @match *://codezine.jp/*
  216. // @match *://zerosumonline.com/*
  217. // @match *://iroirosokuhou.com/*
  218. // @match *://chansoku.com/*
  219. // @match *://matome.usachannel.info/*
  220. // @match https://www.rtings.com/*
  221. // @match *://360life.shinyusha.co.jp/*
  222. // @match *://storia.takeshobo.co.jp/*
  223. // @match *://priucesshanage.blog.jp/*
  224. // @match *://www.comic-brise.com/*
  225. // @match *://kaigo.ten-navi.com/*
  226. // @match *://www.comico.jp/*
  227. // @match *://ichijin-plus.com/*
  228. // @match *://foodservice.ajinomoto.co.jp/article/ajitaro/*
  229. // @match *://gentukiban2.yakiin.net/*
  230. // @match *://gentukiban.yakiin.net/*
  231. // @match *://gentukiban3.yakiin.net/*
  232. // @match *://comic-ogyaaa.com/*
  233. // @match *://manga.okiba.jp/*
  234. // @match https://comic-trail.com/episode/*
  235. // @match *://www.lettuceclub.net/*
  236. // @match *://baila.hpplus.jp/*
  237. // @match *://laza.mandarake.co.jp/*
  238. // @match *://youngchampion.jp/*
  239. // @match *://younganimal.com/*
  240. // @match *://gakcomic.gakken.jp/*
  241. // @match *://webcomicgamma.takeshobo.co.jp/*
  242. // @match *://bigcomics.jp/series/*
  243. // @match *://inunokagayaki.blog.jp/*
  244. // @match *://to-corona-ex.com/*
  245. // @match *://nitter.cz/*
  246. // @match *://nitter.net/*
  247. // @match *://xcancel.com/*
  248. // @match *://urukaruka.com/*
  249. // @match *://misskey.io/*
  250. // @match https://superfoodly.com/orac-values*
  251. // @match *://neetsha.jp/*
  252. // @match *://www.uexpress.com/*
  253. // @match *://manga-no.com/*
  254. // @match *://jp.iherb.com/search*
  255. // @match *://jp.iherb.com/c/*
  256. // @match https://www.rd.com/list/kindness-quotes/*
  257. // @match https://www.randomactsofkindness.org/kindness-quotes*
  258. // @match https://www.ftd.com/blog/kindness-quotes*
  259. // @match https://www.goodgoodgood.co/articles/kindness-quotes*
  260. // @match https://www.thepioneerwoman.com/home-lifestyle/*/kindness-quotes/*
  261. // @match https://www.brainyquote.com/topics/*
  262. // @match https://declutterthemind.com/blog/kindness-quotes/*
  263. // @match https://wisdomquotes.com/kindness-quotes/*
  264. // @match https://www.weareteachers.com/kindness-quotes/*
  265. // @match https://wisdomquotes.com/humanity-quotes/*
  266. // @match https://www.boredpanda.com/kindness-quotes/*
  267. // @match *://www.ncbi.nlm.nih.gov/*
  268. // @match *://pubmed.ncbi.nlm.nih.gov/*
  269. // @match https://www.bmj.com/content/*
  270. // @match *://www.sciencedirect.com/science/article/*
  271. // @match *://omocoro.jp/*
  272. // @match *://nakasorahami.com/*
  273. // @match *://auctions.yahoo.co.jp/search/search*
  274. // @match *://anond.hatelabo.jp/*
  275. // @match *://old.reddit.com/r/*
  276. // @match *://www.quora.com/*
  277. // @match *://ameblo.jp/*
  278. // @match *://tsumanne.net/*
  279. // @match *://zendamakinblog.com/*
  280. // @match *://www.yodobashi.com/*
  281. // @match *://getsuaku.com/*
  282. // @match *://kansai.mag-garden.co.jp/series/*
  283. // @match *://omocoro.jp/*
  284. // @match *://www.corocoro.jp/episode/*
  285. // @match *://championcross.jp/series/*
  286. // @match https://championcross.jp/episodes/*
  287. // @match https://youngchampion.jp/episodes/*
  288. // @match https://www.perplexity.ai/*
  289. // @match *://carula.jp/episodes/*
  290. // @match *://carula.jp/series/*
  291. // @match *://gigazine.net/*
  292. // @match *://www.netoff.co.jp/*
  293. // @match *://sp.manga.nicovideo.jp/*
  294. // @match *://m-nerds.com/*
  295. // @match *://search.yahoo.co.jp/*
  296. // @match *://ynjn.jp/*
  297. // @match *://www.webuomo.jp/*
  298. // @match *://www.amazon.co.jp/*
  299. // @match *://www.harta.jp/*
  300. // @match *://flowercomics.jp/*
  301. // @match *://www.webchikuma.jp/*
  302. // @match *://www.rtings.com/*
  303. // @match *://review.kakaku.com/*
  304. // @match *://shonenjumpplus.com/series*
  305. // @match file:///*/*
  306. // @match *://kuragebunch.com/series*
  307. // @match *://www.sunday-webry.com/series*
  308. // @match *://twiman.net/*
  309. // @match *://nttxstore.jp/*
  310. // @match *://comic-growl.com/*
  311. // @grant GM_addStyle
  312. // @grant GM.addStyle
  313. // @grant GM_setValue
  314. // @grant GM_getValue
  315. // @grant GM_deleteValue
  316. // @require https://code.jquery.com/jquery-3.3.1.min.js
  317. // @namespace https://greasyfork.org/users/181558
  318. // ==/UserScript==
  319. // @match *://*/*
  320.  
  321. (function() {
  322. const PopupHelpMS = 4000; // ポップアップヘルプの表示時間ms
  323. var scrollSpeed = 2.3; // ←→キーのスクロール速度(0:API使用、1:瞬間移動、1.01~:速度指定)
  324. const IGNORE_SIBLING_CLOSER_THAN = 4; // ←→キーで前後のページ画像からの距離がこれ以下の項目は無視
  325. const EXPERIMENTAL_EMBED_FUNCTION_FOR_LOCAL_HTML = 1; // 1:ローカルに単一HTML保存した物で←→キーが効くようにHTMLにscriptタグを埋め込む
  326.  
  327. const debug = 0; // dc() verbose 1:console.log 2:popup3
  328. const LogMatch = 0; // 1でメタデータブロックを生成(開発用)
  329. var marginu = 2;
  330.  
  331. var isChrome = window.navigator.userAgent.toLowerCase().indexOf("chrome") != -1;
  332. var atamadashi = pref("atamadashi") || "false";
  333. var fit = pref("fit") || "true";
  334. var sscrollY = 0;
  335. var sscrollDY = 0;
  336. var sscrollDesEle;
  337. var scrint = 0;
  338. var latestClick = 0;
  339.  
  340. const ButtonBG = "background-color:#3050f0;";
  341. const verbose = 0;
  342. var maey = 0;
  343. var GF = {}
  344.  
  345. var globalFlag = [];
  346. String.prototype.sanit = function() { return this.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/`/g, '&#x60;') }
  347. const CollEleText = (a, b) => new Intl.Collator("ja", { numeric: true, sensitivity: 'base' }).compare(a.textContent, b.textContent)
  348.  
  349. var mousex = 0;
  350. var mousey = 0;
  351. document.addEventListener("mousemove", function(e) {
  352. mousex = e.clientX;
  353. mousey = e.clientY;
  354. }, false);
  355.  
  356. function waitanddo(ele, func, delay = 100, timeoutMs = 60000, start = Date.now(), int = 100) {
  357. let e = ele()
  358. if (e && e?.length !== 0) {
  359. setTimeout(() => { func(e); return e; }, delay);
  360. } else if (Date.now() - start < timeoutMs) setTimeout(() => { waitanddo(ele, func, delay, timeoutMs, start, Math.min(int + 100, 1000)) }, int)
  361. }
  362. const SITEINFO = [{
  363. url: '//comic-growl.com/',
  364. author: '//h2[@class="series-header-author"]',
  365. }, {
  366. url: '//nttxstore.jp/',
  367. sibling: 'div#schphoto > ul > li',
  368. header: 'div#global_nav.header_fixed_inner',
  369. disableSnapWhenPageIsClicked: 1,
  370. }, {
  371. url: '//twiman.net/',
  372. sibling: 'img.object-contain.justify-self-auto.mx-auto',
  373. nextEpisode: () => eleget0('li.relative.cursor-pointer.font-medium.z-10.text-indigo-600')?.nextSibling?.querySelector('a'),
  374. prevEpisode: () => eleget0('li.relative.cursor-pointer.font-medium.z-10.text-indigo-600')?.previousSibling?.querySelector('a'),
  375. header: "auto",
  376. //pankuzuUp: 'div.p-1.rounded-xl.mb-3.max-w-4xl.w-full:nth-child(1 of div.p-1.rounded-xl.mb-3.max-w-4xl.w-full) > div.flex > div.items-center > div.leading-tight > a.text-black.font-bold',
  377. fitFunc: site => { fitFuncA("ul.pagination", SITE?.sibling, 40); },
  378. funcNextPrev: () => {
  379. setTimeout(() => {
  380. window.scrollTo(0, 0);
  381. runAtamadashi()
  382. }, 334)
  383. },
  384. pagenationClickInterval: 334,
  385. }, {
  386. url: '//www.sunday-webry.com/series|//kuragebunch.com/series',
  387. sibling: 'li.webry-series-item.test-series',
  388. disableSnapWhenPageIsClicked: 1,
  389. }, {
  390. url: '//shonenjumpplus.com/series',
  391. sibling: 'li.series-list-item',
  392. disableSnapWhenPageIsClicked: 1,
  393. }, {
  394. url: '//review.kakaku.com/',
  395. sibling: 'div.boxGrInner , div.h1bg',
  396. header: 'auto',
  397. disableSnapWhenPageIsClicked: 1,
  398. }, {
  399. url: '//www.rtings.com/',
  400. sibling: 'div.product_page-category',
  401. header: 'auto',
  402. nextEpisode: '',
  403. prevEpisode: '',
  404. disableSnapWhenPageIsClicked: 1,
  405. author: '',
  406. firstEpisode: '',
  407. lastEpisode: '',
  408. pankuzuUp: '',
  409. }, {
  410. url: '//www.webchikuma.jp/',
  411. sibling: 'div.figure-center > img.lazy , div.image-area',
  412. nextEpisode: 'li[class*="mod-pagenation-item"].pagenation-next > a.box',
  413. pankuzuUp: 'li:nth-child(3) > a.m-breadcrumb__link',
  414. author: `p.author > a`,
  415. fitFunc: site => { fitFuncA(site.header, SITE.sibling, 40); },
  416. }, {
  417. url: '//flowercomics.jp/',
  418. firstEpisode: '//div[last()]/button/p[text()="最初から読む"]',
  419. lastEpisode: () => elegeta('img[class*="h-[18px]"][alt="無料"]')?.pop(),
  420. func1st: () => setInterval(() => eleget0('//div/button/p[text()="途中話を表示する"]/..')?.click(), 999),
  421. author: `h1.font-semibold.row-start-2[class*="md:pt-[12px]"]`,
  422. }, {
  423. url: '//www.harta.jp/',
  424. sibling: 'main > article > div > p',
  425. header: `div.c-subNav`,
  426. fitFunc: site => { fitFuncA(site.header, `main > article > div > p img`, 40); },
  427. /*}, {
  428. url: '//www.amazon.co.jp/',
  429. sibling: '.s-asin',
  430. disableSnapWhenPageIsClicked: 1,
  431. */
  432. }, {
  433. url: '//www.webuomo.jp/',
  434. firstEpisode: '//a[contains(@class,"common-button") and contains(text(),"1話から見る")]',
  435. //sibling:'figure > img',
  436. lastEpisode: 'section.manga-section:nth-of-type(1) > div > div.manga-section__wrapper > div > a > div.detail:last-of-type > div.title',
  437. author: 'div.title > div.name , section:nth-of-type(1) > div > div.manga-section__author:nth-of-type(1)',
  438. header: 'div.large-header-wrapper',
  439. fitFunc: site => { fitFuncA(site.header, `figure > img`, 40); },
  440. keyFunc: {
  441. key: "Enter",
  442. func: e => moveClick('a.newer')
  443. },
  444. //nextEpisode:'a.newer',
  445. //prevEpisode:'a.older',
  446. }, {
  447. url: '//ynjn.jp/',
  448. //firstEpisode: 'svg[viewBox="0 0 32 22"]',
  449. lastEpisode: () => eleget0('div.title__allLink') || elegeta('svg[viewBox="0 0 32 22"]')?.pop(),
  450. author: 'div.title__detailSubTitle',
  451. leftKey: 'a.endpage__text__button button:text*=次の話を読む',
  452. func1st: e => waitanddo(() => eleget0('div.cursor-pointer.truncate.transition-opacity[class*="landscape-touch"]'), e => e?.click()),
  453. }, {
  454. url: '//search.yahoo.co.jp/realtime/search',
  455. sibling: 'div[class*="Tweet_overall__"]',
  456. header: 'div.SearchBox_fixedWrap__h9X4V.SearchBox_fixed__XnfK2.SearchBox_isShadowed__aC9L2',
  457. pankuzuUp: 'div#mtype.target_modules_viewability > ul > li > a',
  458. }, {
  459. url: '//m-nerds.com/',
  460. sibling: () => eleget0('main > div.dividerBottom > h1.heading-primary') ? [] : elegeta('figure.size-full > img , figure.wp-block-image > img'),
  461. firstEpisode: () => elegeta('div.pageContents > section div > p a')?.shift() || elegeta('article > div.archive__contents > h2.heading-secondary > a')?.pop(),
  462. lastEpisode: () => elegeta('div.pageContents > section div > p a , div.wp-block-buttons.is-content-justification-center a.wp-block-button__link')?.pop() || elegeta('article > div.archive__contents > h2.heading-secondary > a')?.shift(),
  463. pankuzuUp: '//a[contains(@class,"btn__link btn__link-secondary") and text()="投稿一覧へ"]',
  464. author: 'div.archiveHead__authorText > h1.heading-primary',
  465. nextEpisode: () => elegeta('div.heading.heading-secondary > a')?.shift(),
  466. prevEpisode: () => elegeta('div.heading.heading-secondary > a')?.pop(),
  467. fitFunc: () => { fitFuncA('', 'figure.size-full > img , figure.wp-block-image > img', 400); },
  468. disableSnapWhenPageIsClicked: 1,
  469. }, {
  470. url: '//sp.manga.nicovideo.jp/',
  471. firstEpisode: '//a/button[@type="button" and text()="最初から読む"]',
  472. lastEpisode: () => elegeta('div.flex-col.justify-between > h4.line-clamp-2')?.shift(),
  473. pankuzuUp: 'a.inline-block > button.rounded.text-sm.bg-white.text-primary-main:text*=作品ページへ',
  474. leftKey: '//div/div[contains(@class,"text-lg leading-none") and text()="次の話"]',
  475. prevEpisode: '//button[@type="button" and contains(text(),"前の話")]',
  476. author: 'p.author , div.flex-col > div:nth-child(1 of div) > p.break-words.text-xs',
  477. disableSnapWhenPageIsClicked: 1,
  478. }, {
  479. url: '//www.netoff.co.jp/',
  480. sibling: 'li.clearfix',
  481. disableSnapWhenPageIsClicked: 1,
  482. }, {
  483. url: '//gigazine.net/',
  484. sibling: 'section',
  485. disableSnapWhenPageIsClicked: 1,
  486. }, {
  487. url: () => ld('www.perplexity.ai') || location.protocol == "file:" && eleget0('a.block[aria-label="Perplexity"]') && eleget0('div.col-span-8'),
  488. sibling: () => elegeta('div.col-span-8'),
  489. disableSnapWhenPageIsClicked: 1,
  490. }, {
  491. url: '//omocoro.jp/',
  492. sibling: () => [elegeta('div.header-meta,div.article-inner p>img'), elegeta('div.article-inner :is(p:not(blockquote>p:first-of-type),blockquote):text*=[a-z0-9ぁ-んァ-ヶア-ン゙゚一-龠]+')].flat().sort((a, b) => a?.getBoundingClientRect()?.top > b?.getBoundingClientRect()?.top ? 1 : -1),
  493. //header: 'auto',
  494. disableSnapWhenPageIsClicked: 1,
  495. }, {
  496. url: '//getsuaku.com/',
  497. lastEpisode: '//a[@class="modal__episode modal__episode-buy" and text()="この話を読む"]',
  498. author: '//div[contains(@class,"detail__artist")]',
  499. keyFunc: { key: "f", func: e => eleget0('//span[contains(@class,"fa fa-expand")]|//span[contains(@class,"fa fa-compress")]')?.click(), },
  500. }, {
  501. url: '//www.yodobashi.com/',
  502. sibling: 'div.srcResultItem_block',
  503. header: 'auto',
  504. disableSnapWhenPageIsClicked: 1,
  505. }, {
  506. url: '//zendamakinblog.com/',
  507. sibling: 'div.views-row.kin-title',
  508. disableSnapWhenPageIsClicked: 1,
  509. }, {
  510. url: '//ameblo.jp/',
  511. sibling: 'img.PhotoSwipeImage,h1.skin-entryTitle',
  512. nextEpisode: 'a.skin-pagingPrev.skin-btnPaging.ga-pagingEntryPrevBottom',
  513. prevEpisode: 'a.skin-pagingNext.skin-btnPaging.ga-pagingEntryNextTop',
  514. header: 'div#ambHeader',
  515. disableSnapWhenPageIsClicked: 1,
  516. }, {
  517. url: '//www.quora.com/',
  518. sibling: '//div/div[@style="box-sizing: border-box; padding: 12px 12px 0px; position: relative;"]',
  519. header: 'auto',
  520. disableSnapWhenPageIsClicked: 1,
  521. }, {
  522. url: '//old.reddit.com/r/',
  523. sibling: 'div.midcol.unvoted,div#siteTable.sitetable , div#header',
  524. header: 'auto',
  525. marginu: 9,
  526. disableSnapWhenPageIsClicked: 1,
  527. pankuzuUp: '//span[@class="hover pagename redditname"]/a',
  528. }, {
  529. url: '//anond.hatelabo.jp/',
  530. sibling: '//DIV[@class="trackback-header"]|//h4|//h3|//h2',
  531. disableSnapWhenPageIsClicked: 1,
  532. }, {
  533. url: 'https://auctions.yahoo.co.jp/search/search',
  534. sibling: 'li.Product',
  535. disableSnapWhenPageIsClicked: 1,
  536. }, {
  537. url: /\/\/gaugau\.futabane(?:t|x)\.jp\/list/,
  538. sibling: 'div.works_tateyomi__img',
  539. header: 'header.header.in-header,div.header__kiba',
  540. fitFunc: () => { fitFuncA('header.header.in-header,div.header__kiba', 'div.works_tateyomi__img img', 400); },
  541. lastEpisode: () => elegeta('//div[contains(@class,"episode__inner")]/div[contains(text(),"無料で読む")]')?.shift(),
  542. firstEpisode: () => !eleget0('div.detailHead') && elegeta('//a/div[contains(@class,"episode__inner")]/div[contains(text(),"無料で読む")]')?.pop(),
  543. author: '//div/div[1]/div[contains(@class,"works__list")]/div/div/div[@id="list__text"]/div/span/a',
  544. keyFunc: { key: "f", func: e => eleget0('//span[contains(@class,"fa fa-expand")]|//span[contains(@class,"fa fa-compress")]')?.click() },
  545. func1st: e => { eleget0('div#cst_controller_normal.information_controller.cst_info.cst_on_normal')?.focus() },
  546. }, {
  547. url: '//nakasorahami.com/',
  548. nextEpisode: '//a[contains(text(),"次の記事 >")]',
  549. prevEpisode: '//a[contains(text(),"< 前の記事")]',
  550. sibling: 'img.pict',
  551. fitFunc: () => { fitFuncA('', 'img.pict', 400); },
  552. }, {
  553. url: '//omocoro.jp/',
  554. sibling: 'div.box',
  555. pankuzuUp: '//header/div[contains(@class,"main-menu ")]/div/nav/a[text()="ラジオ"]',
  556. sortSibling: 1,
  557. disableSnapWhenPageIsClicked: 1,
  558. }, {
  559. url: '//www.sciencedirect.com/science/article/',
  560. sibling: 'article h1,article h2,article h3,article h4,article .tables',
  561. header: 'div.accessbar',
  562. disableSnapWhenPageIsClicked: 1,
  563. }, {
  564. url: /https:\/\/www.bmj.com\/content\/\d+\/bmj/,
  565. sibling: '.article h1,.article h2,.article h3,.article div.highwire-figure,span.highwire-cite-article-type',
  566. disableSnapWhenPageIsClicked: 1,
  567. }, {
  568. url: /\/\/pubmed.ncbi.nlm.nih.gov\/\d+\//,
  569. sibling: 'div#full-view-heading.full-view,h2,div.figures',
  570. disableSnapWhenPageIsClicked: 1,
  571. }, {
  572. url: '//www.ncbi.nlm.nih.gov/pmc/article',
  573. sibling: 'h2,div.fm-sec.half_rhythm.no_top_margin',
  574. pankuzuUp: '//div/button[@data-ga-category="resources_accordion" and @aria-controls="similar-articles-accordion-aside" and @data-action-close="close_similar_articles"]',
  575. disableSnapWhenPageIsClicked: 1,
  576. }, {
  577. url: 'https://www.rd.com/list/kindness-quotes/|https://www.randomactsofkindness.org/kindness-quotes|https://www.ftd.com/blog/kindness-quotes|https://www.goodgoodgood.co/articles/kindness-quotes|https://www.thepioneerwoman.com/home-lifestyle/.*/kindness-quotes/|https://www.brainyquote.com/topics/|https://declutterthemind.com/blog/kindness-quotes/|https://wisdomquotes.com/kindness-quotes/|https://www.weareteachers.com/kindness-quotes/|https://wisdomquotes.com/humanity-quotes/|https://www.boredpanda.com/kindness-quotes/',
  578. sibling: 'div.listicle-card,li.grid-item.fadeIn.last-paragraph-no-margin,article div section h3,article.article-body.w-richtext p strong,div.listicle-slides,div.grid-item.qb.clearfix,article.article ol li,div.center-block.entry-content blockquote,h3.wp-block-heading,div.grid-item.qb.clearfix,.center-block.entry-content blockquote,div.open-list-item.open-list-block.clearfix',
  579. header: 'header,div.container-fluid.nav-header-container,nav.css-f6ivi6.efnztv77,div.bq-subnav,nav.navbar.navbar-expand-lg.bg-white.navbar-light.position-fixed.scrolled,div#floatingmenu',
  580. disableSnapWhenPageIsClicked: 1,
  581. sortSibling: 1,
  582. }, {
  583. url: '//jp.iherb.com/',
  584. sibling: 'div.product-cell-container', //sibling: 'div.product-cell-container.col-xs-12.col-sm-12.col-md-8.col-lg-6',
  585. header: 'div.iherb-header.iherb-header-layout.stackable-base',
  586. disableSnapWhenPageIsClicked: 1,
  587. }, {
  588. url: '//manga-no.com/',
  589. author: 'a[class*="_workId__user_container__"]',
  590. lastEpisode: '//li[last()]/a/div/h3/../..',
  591. leftKey: '//ul/li/a[contains(@class,"AfterwordPage_next__")]',
  592. pankuzuUp: () => { return eleget0('//div[contains(@class,"OtherworksPage_manga_item_one__")]/div/h3/a') || eleget0('//span[contains(@class,"AfterwordPage_user_name__")]') },
  593. firstEpisode: '//span[@class="Button_txt__HmlgW" and contains(text(),"はじめから読む")]',
  594. }, {
  595. url: '//www.uexpress.com/',
  596. //sibling: 'article[class*="LinkContainer_wrapper_bordered_"],article[class*="Article_article__section_"],div[class*="Container_container_"] p',
  597. //sibling: 'article[class*="LinkContainer_wrapper_bordered_"],article,div[class*="Container_container_"] p',
  598. sibling: 'article[class*="LinkContainer_wrapper_bordered_"],article,div[class*="DividerWithContent_divider_"] div div button:visible',
  599. pankuzuUp: '//main/div/div/nav[contains(@class,"nav Secondary_secondary_") and @aria-label="columnist"]/a[last()]',
  600. header: '//html/body/div/div/header/div|//html/body/div/div/header/div',
  601. // func: () => { setInterval(() => (eleget0('div[class*="Article_article__truncator_"] button:visible')||eleget0('div[class*="DividerWithContent_divider_"] div div button:visible:inscreen'))?.click(), 1000) },
  602. //func: () => { setInterval(() => eleget0('div[class*="Article_article__truncator_"] button,div[class*="DividerWithContent_divider_"] div div button:visible:inscreen')?.click(), 1000) },
  603. atamadashiSpeed: Math.random() * 3,
  604. disableSnapWhenPageIsClicked: 1,
  605. func: () => {
  606. setInterval(() => (eleget0('div[class*="Article_article__truncator_"] button:visible') || eleget0('div[class*="DividerWithContent_divider_"] div div button:visible:inscreen'))?.click(), 1000)
  607. //addstyle.add('.danraku{padding-top:1.5em; }')
  608. setInterval(() => {
  609. elegeta('article p:not([data-drk]').forEach(e => {
  610. e.dataset.drk = "1"
  611. let re = /^(?:GENTLE READERS?|DEAR MISS MANNERS)\s*[\-\:]/
  612. let str = e?.textContent?.match0(re)
  613. if (str) {
  614. // let str = e?.textContent?.match0(/^GENTLE READER|^DEAR MISS MANNERS/)
  615. e.textContent = e?.textContent?.replace(re, "");
  616. //e.style.display = "inline"
  617. begin(e, `<b>${str}</b>`)
  618. }
  619. })
  620. }, 99)
  621. //observeUrlChanged(() => doAtama(1.9))
  622. },
  623. }, {
  624. url: '//neetsha.jp/',
  625. sibling: '.image img',
  626. //nextEpisode: '//a[contains(text(),"次 >>")]',
  627. nextEpisode: '//a[@class="next"]|//a[contains(text(),"次 >>")]',
  628. prevEpisode: '//a[@class="prev"]|//a[contains(text(),"<< 前")]',
  629. pankuzuUp: '//a[@class="comictop"]',
  630. fitFunc: () => { fitFuncA('', '.image img:inscreen', 400); },
  631. }, {
  632. url: '//misskey.io/',
  633. sibling: 'article:not(div.dashboard article):visible',
  634. header: 'div > div[style="position: sticky; top: var(--stickyTop, 0); z-index: 1000;"] > div:inscreen:visible',
  635. disableSnapWhenPageIsClicked: 1,
  636. // scrollSpeed:1.01,
  637. }, {
  638. url: 'https://urukaruka.com/',
  639. sibling: 'img.pict',
  640. nextEpisode: 'li.next a',
  641. prevEpisode: 'li.prev a',
  642. /*lastEpisode: () => {
  643. let lateele.offsetWidthadable = () => {
  644. return elegeta('//span[contains(@class,"article-date")]/time')
  645. //.filter(e => !e.innerText.match(/公開は終了しました/) && !eleget0('//p[@class="test-readable-product-point point"]', e.closest("li")))
  646. .sort((a, b) => (new Intl.Collator("ja", { numeric: true, sensitivity: 'base' }).compare)(a.textContent, b.textContent)).reverse()?.[0]
  647. }
  648. },*/
  649. fitFunc: () => { fitFuncA('', 'img.pict', 400); },
  650. }, {
  651. url: 'https://superfoodly.com',
  652. sibling: 'table tr',
  653. header: 'div.cb-nav-bar-wrap.cb-site-padding.clearfix.cb-font-header.wrap',
  654. disableSnapWhenPageIsClicked: 1,
  655. }, {
  656. url: '//nitter.cz/|//nitter.net/|//xcancel.com/',
  657. sibling: 'a.tweet-link,div.timeline-item',
  658. //pankuzuUp: 'a.username',
  659. header: 'nav',
  660. disableSnapWhenPageIsClicked: 1,
  661. }, {
  662. url: '//to-corona-ex.com/',
  663. firstEpisode: '//div[@role="list"]/div[1]/a/div[2]/div[1]/../..',
  664. lastEpisode: '//DIV[@class="grow truncate pl-3 text-center text-sm font-semibold tablet:text-base"]',
  665. pankuzuUp: '//div[@class="sc-cZFQFd imMKqL" and contains(text(),"作品詳細")]',
  666. author: '//html/body/div[@id="__next"]/div/main/div/div[1]/div[@class="flex flex-col items-start tablet:flex-row"]/div[1]',
  667. }, {
  668. url: '//inunokagayaki.blog.jp/',
  669. lastEpisode: 'h1.article-title > a',
  670. sibling: 'img.pict , div > div#main-inner > div > article',
  671. disableSnapWhenPageIsClicked: 1,
  672. nextEpisode: 'li.next>a',
  673. prevEpisode: 'li.prev>a',
  674. fitFunc: () => { fitFuncA('', 'img.pict', 400); },
  675. }, {
  676. url: '//(gammaplus|webcomicgamma).takeshobo.co.jp/(_files|manga)',
  677. lastEpisode: '//li[2]/a[contains(text(),"最新話を読む")]|//a[contains(@class,"btn__link anker") and text()="最新話を読む"]',
  678. firstEpisode: '//a[@class="btn__link anker" and text()="第1話を読む"]',
  679. //firstEpisode: () => elegeta('//ul[@class="read__contents"]/li[last()]')?.pop(),
  680. // lastEpisode: () => elegeta('//li[@class="episode__text"]').sort(CollEleText)?.pop(),
  681. author: '//ul[@class="manga__title"]/li[2]',
  682. pankuzuUp: '//div/div[2]/a[@rel="noreferrer" and contains(text(),"作品TOPへ")]|//div[1]/a[@rel="noreferrer" and text()="作品詳細へ戻る"]',
  683. leftKey: `//div/div[@class="e-btn__episode"]/a[@onclick="ga('send','event','レコメンド','リンク','次の話へ')"]`,
  684. insteadofClickFunc: (e) => { if (e.href) { location.href = e.href } else { e.click() } },
  685. }, {
  686. url: '//gakcomic.gakken.jp/',
  687. firstEpisode: '//div/div[@class="pg-book-episodes"]/div[last()]/div[2]/a[text()="無料で読む"]',
  688. lastEpisode: '//div[@class="pg-book-episode__data"]/a[text()="無料で読む"]',
  689. author: '//ul/li[contains(@class,"pg-book-meta__editor-list")]',
  690. }, {
  691. url: /\/\/championcross\.jp\/series\/|\/carula\.jp\/series\//,
  692. lastEpisode: () => eleget0('//a[@class="series-ep-info-link" and contains(text(),"最新話から")]') || eleget0('//img[@class="lazyloaded mode-narrow" and @data-src="/images/icons/free_ja.svg"]') || eleget0('//span[@class="free-icon-new"]'),
  693. firstEpisode: () => eleget0('//a[text()="はじめから読む(無料)"]') || eleget0('//div[1]/div/div[last()]/a[contains(text(),"作品をすべて見る")]') || eleget0('//a[contains(@class,"series-act-read-btn") and text()="はじめから読む"]') || eleget0('//div/h2[not(contains(text(),"この作品を読んだあなたにオススメ"))]/../../..//div[contains(@class,"manga-list")]/div[last()]/div[@class="store-box"]/div[2]/h2/a') || eleget0('//div/a[@class="g-btn mode-more"]') || eleget0('//div[last()]/div[1]/h2[@class="manga-title"]/a') || eleget0('//div[last()]/div[@class="store-box"]/div[2]/h2/a[not(ancestor::div[@id="recomend-series-list"])]'),
  694. author: '//span[@class="article-text"]|//span[contains(@class,"author-name-link")]',
  695. }, {
  696. url: 'https://younganimal.com/episodes/|//bigcomics.jp/episodes/|//carula.jp/episodes/',
  697. author: '//div[@class=\"series-h-credit-user\"]/span[1]',
  698. lastEpisode: '//div/img[@alt="無料" and @data-lazydone="1" and @height="24"]/..',
  699. //firstEpisode: '//div[2]/div[last()]/div/img[@class="lazyloaded mode-narrow" and @alt="無料"]/..',
  700. func: () => {
  701. oaco('a.click-link#show-more-article') // もっと見る
  702. oaco('span.-cv-icon.-cv-f-icon[data-icon="expand"],span.-cv-icon[data-icon="expand"]') // 拡大
  703. },
  704. }, {
  705. url: 'https://championcross.jp/episodes/|//youngchampion.jp/episodes/',
  706. author: '//span[contains(@class,"author-name-link")]',
  707. func: () => {
  708. oaco('a.click-link#show-more-article') // もっと見る
  709. oaco('span.-cv-icon.-cv-f-icon[data-icon="expand"]') // 拡大
  710. },
  711. }, {
  712. url: /\/\/youngchampion\.jp\/(?:series|episodes)\/|\/\/comicride\.jp\/(?:series|episodes)\//,
  713. lastEpisode: () => eleget0('//a[@class="series-ep-info-link" and contains(text(),"最新話から")]') || eleget0('//img[@class="lazyloaded mode-narrow" and @data-src="/images/icons/free_ja.svg"]') || eleget0('//span[@class="free-icon-new"]'),
  714. firstEpisode: () => eleget0('//a[text()="はじめから読む(無料)"]') || eleget0('//div[1]/div/div[last()]/a[contains(text(),"作品をすべて見る")]') || eleget0('//a[contains(@class,"series-act-read-btn") and text()="はじめから読む"]') || eleget0('//div/h2[not(contains(text(),"この作品を読んだあなたにオススメ"))]/../../..//div[contains(@class,"manga-list")]/div[last()]/div[@class="store-box"]/div[2]/h2/a') || eleget0('//div/a[@class="g-btn mode-more"]') || eleget0('//div[last()]/div[1]/h2[@class="manga-title"]/a') || eleget0('//div[last()]/div[@class="store-box"]/div[2]/h2/a[not(ancestor::div[@id="recomend-series-list"])]'),
  715.  
  716. /*firstEpisode: '//a[@class="series-act-read-btn" and text()="はじめから読む"]|//div/a[contains(@class,"series-ep-info-link selected") and text()="最新話から"]',lastEpisode: '//div/div/div/a[@class="series-ep-info-link" and @onclick="orderArticleBy(1);"]|//div[@class="g-payment-article mode-list"]/img[@src="/images/icons/free_ja.svg" and @alt="無料"]/..|//div[@class="series-ep-list-symbols"]/div/img[@alt="「待つと無料」" and @width="24"]/..|//span[@class="free-icon-new"]',*/
  717. //author: '//span[@class="article-text"]|//span[contains(@class,"author-name-link")]',
  718. author: 'span.article-text',
  719. pankuzuUp: 'div.series-h-title-wrap > h1.series-h-title > span',
  720. }, {
  721. url: '//youngchampion.jp/episodes',
  722. author: '//div[@class=\"series-h-credit-user\"]/span[1]',
  723. lastEpisode: '//div/img[@alt="無料" and @data-lazydone="1" and @height="24"]/..',
  724. //firstEpisode: '//div[2]/div[last()]/div/img[@class="lazyloaded mode-narrow" and @alt="無料"]/..',
  725. func: () => {
  726. oaco('a.click-link#show-more-article') // もっと見る
  727. oaco('span.-cv-icon.-cv-f-icon[data-icon="expand"]') // 拡大
  728. },
  729. keyFunc: { key: "Escape", func: e => eleget0('//div/button/img[@class="ga-popup-close"]')?.click() },
  730. }, {
  731. url: '//laza.mandarake.co.jp/',
  732. // sibling: 'div.ohanashi a img',
  733. sibling: 'div.ohanashi img',
  734. pankuzuUp: '//div[@class="top"]/a/img',
  735. header: '//div[@class="local_head fixed"]',
  736. firstEpisode: '//ul[@class="shortcut"]/li[last()]/a/img/..',
  737. lastEpisode: () => eleget0('//li[1]/a/img[@src="/BTP_plus/img/list/saishin.png"]/..') || eleget0('//ul/li[4]/a[contains(text(),"漫画を読む")]'),
  738. fitFunc: () => {
  739. if (lh("/manga/")) addstyle.add('.local_head{transform-origin:top; transform:scale(1,0.5);}');
  740. fitFuncA('div.local_head.fixed', 'div.ohanashi img', 400);
  741. },
  742. author: '//div[5]/div[@class="shokai"]/div/strong',
  743. }, {
  744. url: '//baila.hpplus.jp/',
  745. firstEpisode: '//a[@id="mangaNextBtn0"]',
  746. lastEpisode: '//li[1]/article/div[last()]/a[contains(@class,"mangaNextBtn")]',
  747. sibling: '//div[@class="o-article-block-image__img"]/img',
  748. header: '//div[3]/header',
  749. author: '//p[@class="o-manga__profile__author"]',
  750. fitFunc: () => { fitFuncA('//div[3]/header', '//div[@class="o-article-block-image__img"]/img', 400); },
  751. scrollSpeed: 3,
  752. nextEpisode: '//div/a/button[@id="mangaNextBtnId"]/img',
  753. }, {
  754. url: '//www.lettuceclub.net/',
  755. sibling: '//div[contains(@class,"c-freearea")]/figure/a/img',
  756. firstEpisode: '//div[contains(@class,"p-items__frame")]/ol/li[1]/a/figure/span|//a[contains(text(),"続きを読む")]',
  757. nextEpisode: '//a[@class="p-pager__next"]|//a[contains(text(),"続きを読む")]|//a[@class="p-navigation__next"]',
  758. prevEpisode: '//a[@class="p-pager__prev"]|//div/a[@class="p-navigation__prev"]',
  759. pankuzuUp: '//a[contains(text(),"』連載をまとめて読む◀◀")]|//a[contains(text(),"』▶掲載話一覧")]|//a[contains(text(),"連載一覧へ →")]',
  760. header: '.p-globalnavi',
  761. author: '//h1[@class="c-heading__title"]',
  762. fitFunc: () => { fitFuncA('.p-globalnavi', '//figure/a/img', 400); },
  763. }, {
  764. url: '//manga.okiba.jp/',
  765. firstEpisode: '//div/div/table[@class="chapters"]/tbody/tr/td/div[1]/p/a',
  766. lastEpisode: '//div[@class="latest-section"]/p/a',
  767. sibling: '//img[@class="comicImage"]',
  768. nextEpisode: '//div[3]/div[@class="pager-next"]/a',
  769. prevEpisode: '//div/div[@class="pager-prev"]/a',
  770. author: '//div/div[@class="comment"]/p[1]/a',
  771. fitFunc: () => { fitFuncA('', '//img[@class="comicImage"]', 400); },
  772. }, {
  773. url: /\/\/gentukiban.?\.yakiin\.net\//,
  774. sibling: 'center img',
  775. fitFunc: () => { fitFuncA('', 'center img', 400); },
  776. }, {
  777. url: '//foodservice.ajinomoto.co.jp/article/ajitaro',
  778. sibling: '//ul/li/img',
  779. pankuzuUp: '//a[@class="back"]',
  780. fitFunc: () => { fitFuncA('', '//ul/li/img', 400); },
  781. }, {
  782. url: '//ichijin-plus.com/',
  783. firstEpisode: '//li[1]/a/div[2]/div[1]/../..',
  784. lastEpisode: '//a/div[1]/span[contains(text(),"最新話")]',
  785. pankuzuUp: '//div[contains(text(),"作品詳細")]',
  786. leftKey: '//div[contains(text(),"次の話へ")]',
  787. author: '/HTML/BODY/DIV[1]/DIV[1]/MAIN[1]/DIV[1]/DIV[1]/DIV[1]/DIV[1]/DIV[1]/DIV[1]',
  788. prevEpisode: '//div[contains(text(),"前の話へ")]',
  789. }, {
  790. url: '//kaigo.ten-navi.com/',
  791. firstEpisode: '//section/ul/li[last()]/article/a/div/h3[contains(@class,"card-title")]/../..',
  792. lastEpisode: '//ul[@class="stack-xl"]/li[1]/article/a/div/h3[@class="card-title"]',
  793. author: '//header/h1[@class="title-primary"]',
  794. sibling: '//p/picture/img|//figure/picture/img',
  795. header: '//header[@class="header"]',
  796. nextEpisode: '//span[@class="btn btn-primary btn-circle btn-sm btn-comic-next"]',
  797. prevEpisode: '//li/span[@class="btn btn-primary btn-circle btn-sm btn-comic-prev"]',
  798. pankuzuUp: '//span[contains(text(),"このマンガの連載一覧へ")]',
  799. fitFunc: () => { fitFuncA('//header[@class="header"]', '//p/picture/img|//figure/picture/img'), 0 },
  800. }, {
  801. url: '//www-indies.mangabox.me/',
  802. prevEpisode: '//a[@id="indies-header-back" and contains(text(),"戻る")]',
  803. leftKey: '//span[@class="indies-episode-item-next"]',
  804. author: '//div[@class="indies-episode-author"]/div',
  805. }, {
  806. url: '//www.comic-brise.com/',
  807. firstEpisode: '//a[last()]/div/div[@class="labels"]/span[@class="label-item is-free"]',
  808. lastEpisode: '//div/a[1]/div/div/span[@class="label-item is-free"]',
  809. pankuzuUp: '//a[text()="作品紹介ページへ"]',
  810. author: '//div[@class="article-head"]/p[@class="post-sub-title"]',
  811. }, {
  812. url: '//priucesshanage.blog.jp/',
  813. sibling: '//img[@class="pict"]|//h1[@class="article-title"]',
  814. }, {
  815. url: '//storia.takeshobo.co.jp/',
  816. firstEpisode: '//div[last()]/div[last()]/a[@class="read__link"]/div[text()="読む"]/..',
  817. lastEpisode: '//div[1]/a/div[@class="episode__read" and text()="読む"]',
  818. }, {
  819. url: '//360life.shinyusha.co.jp/',
  820. sibling: 'span.headline-icon,.large-headline',
  821. }, {
  822. url: '//www.rtings.com/',
  823. sibling: '.test_group,.product_page-title,h2',
  824. header: '//div[@class="navbar-main"]',
  825. }, {
  826. url: '//zerosumonline.com/',
  827. firstEpisode: '//div[@class="story_cell"]/ul/li[last()]/ul/li/a',
  828. lastEpisode: '//div/div[@class="read"]/a[text()=" 読む"]',
  829. }, {
  830. url: '//codezine.jp/',
  831. sibling: '//div[@class="manga"]|//section[@class="columnSection"]|//div[@class="article"]/h2|//section/ul[@class="catList"]/li',
  832. author: '//div[@class="authorName" and @itemprop="author" and @itemscope=""]/a/span[@itemprop="name"]',
  833. pankuzuUp: '//a[@itemprop="item"]/span[@itemprop="name"]',
  834. }, {
  835. url: '//michikusacomics.jp/',
  836. firstEpisode: '//div[@class="items"]/div[1]/a',
  837. lastEpisode: '//a[@class="su-button su-button-style-flat"]/span[contains(text(),"最新話を読む")]|//div[contains(text(),"最新話を読む")]',
  838. author: '//span[@class="authorName"]',
  839. pankuzuUp: '//p[@class="q_back_titletop" and contains(text(),"作品TOPへ")]',
  840. }, {
  841. url: '//gaugau.futabanet.jp/',
  842. firstEpisode: '//div[@class="detail-ex__btn-list"]/div[4]/a',
  843. lastEpisode: '//div[@class="detail-ex__btn-list"]/div[1]/a[@rel="noopener"]',
  844. author: '//div[@class="detail-ex__writer"]/a',
  845. pankuzuUp: '//div[@class="r-linkbutton r-sub"]/a[contains(text(),"作品詳細を見る")]',
  846. //func:()=>{eleget0('.toggle-btn.js-detail__list-btn')?.click()},
  847. }, {
  848. url: '//write.as/|//.*.writeas.com',
  849. sibling: '//article',
  850. disableSnapWhenPageIsClicked: 1,
  851. }, {
  852. url: '//ciao.shogakukan.co.jp/webwork/',
  853. firstEpisode: '//a[1]/section/div/div[@class="storyArea-openBtn" and contains(text(),"公開中")]',
  854. lastEpisode: '//section[@class="free-start"]/div/a[contains(text(),"最新話を読む")]',
  855. author: '//div[@class="mainArea-right"]/p[@class="author"]',
  856. }, {
  857. url: '//7irocomics.jp/',
  858. firstEpisode: '//li/div[@class="comic_btn"]/a[1]/div/strong',
  859. lastEpisode: '//div[@class="comic_btn"]/a[last()]/div/strong',
  860. author: '//li/div[@class="info"]/h3/strong',
  861. leftKey: '//div[contains(@class,"r-inner")]/div/a[contains(text(),"次へ")]',
  862. pankuzuUp: '//div/a[text()="作品詳細ページはこちら"]',
  863. }, {
  864. url: '//twicomi.com/',
  865. //sibling: 'div.index,div.page-no',
  866. sibling: 'div.index,div.image', //sibling: 'div.index,.page-no',
  867. siblingHelp: '↑↓:前次ページ',
  868. lastEpisode: '//div[1]/section/div/div[1]/div/a[@class="manga-image"]',
  869. keyNextSibling: 'ArrowDown',
  870. keyPrevSibling: 'ArrowUp',
  871. allowedGap: 60,
  872. pankuzuUp: '//i[@class="fas fa-fast-backward"]/..',
  873. keyFuncHelpXP: '//div', // 無条件にヒットするもの
  874. keyFuncHelp: 'A:画像を画面にフィット',
  875. func: () => {
  876. globalFlag.fit = (pref("twicomi_zflag") === undefined ? 1 : pref("twicomi_zflag"));
  877. SITE.setsize(globalFlag);
  878. },
  879. keyFunc: {
  880. key: "a",
  881. func: () => {
  882. globalFlag.fit ^= 1;
  883. pref("twicomi_zflag", globalFlag.fit)
  884. SITE.setsize(globalFlag)
  885. return false;
  886. },
  887. },
  888. setsize: (globalFlag) => {
  889. if (globalFlag.fit == 0) {
  890. popup("A:画像フィット(off)", "#808080")
  891. if (globalFlag.iID) {
  892. clearInterval(globalFlag.iID);
  893. globalFlag.iID = null;
  894. elegeta('//div[@class="image"]/img').forEach(e => {
  895. e.style.maxWidth = "650px";
  896. e.parentNode.style.maxWidth = "650px";
  897. e.style.height = "";
  898. e.style.width = "";
  899. });
  900. return;
  901. }
  902. }
  903. if (globalFlag.fit == 1 && globalFlag.iID == null) {
  904. popup("A:画像フィット(on)")
  905. globalFlag.iID = setInterval(() => { // a::画像を引き伸ばす
  906. // $("div.index,div.page-no").css({ "padding": "0px", "height": "16.5px","margin":`${marginu}px` });
  907. $("div.index,div.page-no").css({ "padding": "0px", "height": "16.5px" });
  908. // let wh = document.documentElement.clientHeight; //window.innerHeight;
  909. let wh = document.documentElement.clientHeight - marginu * 2 - 17; //window.innerHeight;
  910. let h = eleget0('//div[@class="index"]');
  911. let hy = h ? h.offsetHeight : 100;
  912. let ce = eleget0('//div[@class="tweet"]');
  913. let cliX = ce ? ce.offsetWidth : 100;
  914. elegeta('//div[@class="image"]/img').forEach(e => {
  915. {
  916. let oy = e.naturalHeight;
  917. let ox = e.naturalWidth;
  918. let asp = ox / oy;
  919. if ((asp) < (cliX / (wh - hy - 0))) {
  920. e.style.height = wh - hy - 0 + "px";
  921. e.style.width = ((wh - hy - 0) * asp) + "px";
  922. } else {
  923. e.style.width = cliX + "px"
  924. e.style.height = cliX / asp + "px";
  925. }
  926. e.style.maxWidth = "100%";
  927. e.parentNode.style.maxWidth = "100%";
  928. }
  929. })
  930. }, 250);
  931. }
  932. },
  933. }, {
  934. url: '//nlab.itmedia.co.jp/',
  935. sibling: '//div[@style="width: 596px;"]/a[last()]/..',
  936. // author: '//div[@id="byline"]/a',
  937. header: '//div[@id="myBoxList"]',
  938. lastEpisode: '//div[1]/div[@class="colBoxTitle"]/h3/a',
  939. firstEpisode: '//div[last()]/div[@class="colBoxTitle"]/h3/a',
  940. fitFunc: site => { fitFuncA(site.header, `div.inner > div[style="width: 596px;"] > a:last-child > img`, 40); },
  941. }, {
  942. url: '//twitter.com/|//mobile.twitter.com|//x.com/',
  943. sibling: '//div/article/../../..',
  944. header: '.css-175oi2r.r-aqfbo4.r-gtdqiz.r-1gn8etr.r-1g40b8q',
  945. disableSnapWhenPageIsClicked: 1,
  946. }, {
  947. url: '//game.asahi.com/',
  948. firstEpisode: '//ul/li[last()]/div[contains(@class,"list-article__col")]/p/a',
  949. lastEpisode: '//ul[@class="list-article__list"]/li[1]/div/p[2]/a',
  950. }, {
  951. url: '//shonenjumpplus.com/',
  952. firstEpisode: '//section[last()]/div/h1[@class="entry-title"]/a|//div/ul[@class="recent-entries hatena-urllist urllist-with-thumbnails"]/li[last()]/div/a[last()]',
  953. lastEpisode: '//section[1]/div/h1[@class="entry-title"]/a|//ul/li[1]/div[@class="urllist-item-inner recent-entries-item-inner"]/a[2]',
  954. sibling: '//div/div[@class="entry-content"]/p',
  955. author: '//h2[@class="series-header-author"]',
  956. }, {
  957. url: '//boards.4channel.org/',
  958. sibling: '.postContainer:not(#hoverUI .postContainer),div.thread,.catalog-container',
  959. header: 'div#header-bar.dialog',
  960. pankuzuUp: '//div[@class="navLinks desktop"]/a[2]',
  961. disableSnapWhenPageIsClicked: 1,
  962. }, {
  963. url: '//the360.life/',
  964. sibling: '//div/div/section[@class="block"]',
  965. atamadashi: '//div[@class="bread-crumb bread-crumb_top"]',
  966. disableSnapWhenPageIsClicked: 1,
  967. }, {
  968. url: '//my-best.com/',
  969. sibling: '//div[@id="ranking"]/div[last()]/div/div/div|//div[@class="p-contents-item-part"]',
  970. atamadashi: '//div/div[6]/div[@id="ranking"]|//h2[@class="p-contents-ranking-header__title"]',
  971. disableSnapWhenPageIsClicked: 1,
  972. func: () => {
  973. // setTimeout(()=>{GM_addStyle('.l-column{width:97%} .l-column__main{width:97%}')},100)
  974. setTimeout(() => { GM_addStyle('.l-column{margin:5%;width:95%;} .l-column__main{width:100%;}'); }, 100)
  975.  
  976. },
  977. }, {
  978. url: '//bunshun.jp/',
  979. func1st: () => {
  980. if (!lh(/\/\/bunshun\.jp\/category\//) && !(lh(/\/\/bunshun\.jp\/articles\//) && eleget0('//nav/ul[contains(@class,"breadcrumb__list")]/li[2]/a[text()="コミック"]'))) { return "abort" }
  981. let t1 = (eleget0('//div[2]/div[@class="author-box"]/p[@class="author"]/a[1]')?.innerText || "");
  982. let t2 = (eleget0('//div/h2[@class="subtitle"]')?.innerText || "");
  983. document.title = `${t1?t1+" ":""}${t2?t2+" ":""} ${document.title}`
  984. },
  985. firstEpisode: '//ul[last()]/li[last()]/div[last()]/h3[@class="title"]/a',
  986. lastEpisode: '//a[@class="border" and text()="最新回を読む"]',
  987. sibling: '//a[@class="thumb-link ga_tracking"]/img[@class="main-image"]/../../..',
  988. header: 'auto',
  989. author: '//p[@class="author"]/a|//p[contains(@class,"name")]',
  990. prevEpisode: '//div/a[@class="arrow" and contains(text(),"PREV")]',
  991. nextEpisode: '//div/a[@class="arrow" and contains(text(),"NEXT")]',
  992. pankuzuUp: '//a[contains(@class,"btn ga_tracking")]',
  993. fitFunc: () => { fitFuncA('.header', '//img[@class="main-image"]', 400) },
  994. }, {
  995. url: '//www.mishimaga.com/',
  996. sibling: '//div[@class="pcVer"]/p/img',
  997. author: '//p[@class="name author"]',
  998. header: '//div[@class="head-wrap"]',
  999. }, {
  1000. url: '//www.corocoro.jp/title/|//www.corocoro.jp/author/|//www.corocoro.jp/chapter/',
  1001. firstEpisode: () => lh('//www.corocoro.jp/title/|//www.corocoro.jp/author/') && elegeta('//div[contains(@class,"col-span-1 col-start-3 row-start-1 justify-self-end")]/img[@alt="無料"]')?.shift(),
  1002. lastEpisode: () => lh('//www.corocoro.jp/title/|//www.corocoro.jp/author/') && elegeta('//div[contains(@class,"col-span-1 col-start-3 row-start-1 justify-self-end")]/img[@alt="無料"]')?.pop(),
  1003. author: 'ul[class*="gap-[8px]"][class*="md:gap-[12px]"] > a.text-gray.underline > li > p[class*="text-[14px]"] , div.p-4 > div.flex > div.items-center > div.flex > div[class*="flex-col"][class*="gap-2"]:nth-of-type(1) > p[class*="text-[13px]"].font-bold , div.mx-auto[class*="max-w-5xl"] > div[class*="justify-between"] > div.flex.py-2[class*="pl-4"][class*="pr-2"][class*="md:py-3"] > p',
  1004. func: () => { addstyle.add(`div[data-testid="viewer-action-area"] { height: 100dvh !important; }`) },
  1005. }, {
  1006. url: '//firecross.jp/',
  1007. lastEpisode: '//li[1]/ul/li/form/button[@class="btn-free"]',
  1008. firstEpisode: '//li[last()]/ul/li/form[@data-api="reader"]/button[@class="btn-free"]',
  1009. author: '//section/div/ul[@class="ebook-series-author"]/li/a|//li[contains(@class,"ebook-series-author-item")]/a',
  1010. nextEpisode: '//button[@class="btn--simple--arrow" and contains(text(),"次の話を読む")]',
  1011. leftKey: '//button[@class="btn--simple--arrow" and contains(text(),"次の話を読む")]|//div[@class="colophonNextArea"]/form/button/div/p[contains(text(),"次の話を読む")]',
  1012. pankuzuUp: '//main/div/div/a[@class="btn-close" and text()="閉じる"]|//div[contains(@class,"colophonNextArea")]/a/span[text()="作品ホーム"]',
  1013. }, {
  1014. url: '//www.pixiv.net/artworks/|://www.pixiv.net/users/',
  1015. atamadashi: '//div/div[@role="presentation"]',
  1016. }, {
  1017. url: '//www.pixiv.net/users/',
  1018. author: '//div/div/div/div[1]/div/h1',
  1019. }, {
  1020. url: '//konomanga.jp/',
  1021. firstEpisode: '//a[@id="firstStory"]/span[text()="第1話を読む"]/..',
  1022. lastEpisode: '//div[2]/a[@id="latestStory"]/span',
  1023. author: '//div/p[@id="authorName"]',
  1024. }, {
  1025. url: '//inthelife.club/',
  1026. firstEpisode: '//div[@class="contLeft"]/section/div[2]/ul/li[last()]/a/div[@class="txtBox"]/p[1]/../..',
  1027. lastEpisode: '//div[1]/section/div[2]/ul/li[2]/a/div[@class="txtBox"]/p[1]',
  1028. sibling: '//div[@class="kizi-honbun"]/img',
  1029. header: '//header[@class="headerFixed"]',
  1030. nextEpisode: '//div[@class="contBtn"]/a',
  1031. }, {
  1032. url: '//i-voce.jp/',
  1033. firstEpisode: '//div/ul/li[last()]/a/div/div/div/div[2]/p[@class="title_2AUDo"]/../../../../..',
  1034. lastEpisode: '//div[2]/div[1]/div/ul/li[1]/a/div[1]/div/div/div[2]/p[@class="title_2AUDo"]',
  1035. nextEpisode: '//a[@class="wp-block-ve-nextpage-copy__text"]',
  1036. }, {
  1037. url: '//comicborder.com/',
  1038. author: '//h2[@class="series-header-author"]',
  1039. }, {
  1040. url: 'https://digitalmargaret.jp/contents/',
  1041. leftKey: '//div[@class="r-inner"]/div/a[contains(text(),"話を読む")]',
  1042. }, {
  1043. url: '//digitalmargaret.jp/detail/',
  1044. firstEpisode: '//div[last()]/div[@class="btn"]/a[contains(text(),"読む")]',
  1045. lastEpisode: '//div[1]/div[@class="btn"]/a[contains(text(),"読む")]',
  1046. }, {
  1047. url: '//www.comicnettai.com/',
  1048. firstEpisode: '//div/a[last()]/div/span[text()="読む"]',
  1049. lastEpisode: '//a[1]/div[3]/span[@class="btn--detail--read"]',
  1050. author: '//span[@class="detail__author__item"]',
  1051. }, {
  1052. url: '//novema.jp/',
  1053. firstEpisode: '//ul/li/a[text()="第1話を読む"]',
  1054. lastEpisode: '//a[text()="最新話を読む"]',
  1055. author: '//ul[@class="credit"]/li',
  1056. }, {
  1057. url: '//www.123hon.com/',
  1058. lastEpisode: '//div[2]/div[2]/ul[@class="read-story"]/li/a[text()="最新話を読む"]',
  1059. firstEpisode: '//ul[contains(@class,"read-story")]/li/a[text()="第1話を読む"]',
  1060. pankuzuUp: '//div[@class="r-inner"]/div[4]/a[text()="シリーズ一覧"]',
  1061. }, {
  1062. url: '//feelweb.jp/episode/',
  1063. author: '//h2[@class="series-header-author"]',
  1064. }, {
  1065. url: '//manga-5.com/',
  1066. firstEpisode: '//div[@class="product-state"]/ul/li[1]/a[1]',
  1067. lastEpisode: '//ul[@class="list_series list-items"]/li[last()]/a[1]',
  1068. author: '//div/div/div[@class="series-title"]/h3/strong',
  1069. }, {
  1070. url: '//pie.co.jp/',
  1071. firstEpisode: '//ul[@class="articleBlockButton"]/li[last()]/a[text()="1話を読む"]|.//li[last()]/a/h3[@class="seriesPostList_title"]',
  1072. lastEpisode: '//ul/li[@class="articleBlockButton_node"]/a[text()="最新話を読む"]',
  1073. author: '//p[@class="articleBlock_textBox_name"]',
  1074. nextEpisode: '//a[text()="次の連載を読む"]',
  1075. prevEpisode: '//div/a[text()="前の連載を読む"]',
  1076. }, {
  1077. url: '//.+.fanbox.cc/posts/.+',
  1078. nextEpisode: '//div[@class="sc-1vjtieq-18 jOKXGO"]/a/div',
  1079. prevEpisode: '//div[@class="sc-1vjtieq-19 dlQSkX"]/a/div',
  1080. sibling: '//div/div/article/div[1]/h1|//article/div[1]/div/div/div/div/div',
  1081. atamadashi: '//div/div/article/div[1]/h1|//article/div[1]/div/div/div/div/div',
  1082. header: '//div[@id="root"]/div[4]',
  1083. pankuzuUp: '//a[text()="一覧に戻る"]',
  1084. funcNextPrev: () => { setTimeout(() => { loadfocus(0, SITE.atamadashi) }, 1) },
  1085. }, {
  1086. url: '//pash-up.jp/',
  1087. lastEpisode: '//a[@class="c-btn_read02"]/span[contains(text(),"最新話を読む")]/..',
  1088. firstEpisode: '//div/a[contains(@class,"c-btn_read01")]/span[text()="1話を読む"]',
  1089. author: '//div/p[contains(@class,"p-content_head_original")]/p',
  1090. }, {
  1091. url: '//togetter.com/',
  1092. sibling: '#toptitle,.list_box,.list_box .list_photo:not(.list_box .list_photo:first-child),.md-h-2,li.has_thumb.clearfix,#comment-box-portal>div>ul>div',
  1093. /* header: '//div[@class="header_navigator"]|//header[@id="header"]|//div[@class="header_navigator "]',
  1094. disableSnapWhenPageIsClicked: 1,
  1095. fitFunc: () => fitFuncB('div.header_navigator', '//div[@class="list_photo"]/img', 400),
  1096. */
  1097. //scrollSpeed: 1.1,
  1098. header: 'div.header_navigator,heade#header,div.header_navigator',
  1099. disableSnapWhenPageIsClicked: 1,
  1100. fitFunc: () => fitFuncB('div.header_navigator', 'div.list_photo_box img', 400),
  1101. }, {
  1102. url: '//yuik.net/',
  1103. sibling: '#main .clearfix figure,#main li.list-group-item,#main .clearfix p',
  1104. prevEpisode: '//a[@rel="prev"]',
  1105. nextEpisode: '//a[@rel="next"]',
  1106. lastEpisode: () => elegeta('p.last-updated-content-date').sort(CollEleText)?.pop(),
  1107. header: 'div#nav',
  1108. fitFunc: () => fitFuncA("div#nav", '//a[contains(@class,"spotlight")]/picture/img', 400),
  1109. disableSnapWhenPageIsClicked: 1,
  1110. }, {
  1111. url: '//yuk2.net/',
  1112. /* sibling: '#main .alignnone',
  1113. header: 'div.pin',
  1114. firstEpisode: '//ul[1]/li[last()]/div/div[last()]/a[@target="_self"]',
  1115. lastEpisode: '//ul[1]/li[1]/div/div[last()]/a[@target="_self" and @rel="noopener"]',
  1116. disableSnapWhenPageIsClicked: 1,
  1117. */
  1118. sibling: '//div/p/img',
  1119. pankuzuUp: '//ol[@id="breadcrumb"]/li[last()]/a',
  1120. fitFunc: site => fitFuncA("", site.sibling, 400),
  1121. nextEpisode: '//div[@class="next-arrow"]/span',
  1122. prevEpisode: '//div[@class="prev-arrow"]/span',
  1123. }, {
  1124. url: '//yakb.net/',
  1125. sibling: '//div[@id="core"]/div/div/p[2]/img',
  1126. pankuzuUp: '//ol[@id="breadcrumb"]/li[last()]/a',
  1127. }, {
  1128. url: '//mankai.jp/',
  1129. firstEpisode: '//div[@class="pGrayWrapper"]/ul/li[last()]/a/h3/..',
  1130. lastEpisode: '//div[@class="pGrayWrapper"]/ul[@class="modThreeBannerList"]/li[1]/a/h3',
  1131. author: '//div/p[@class="modProfileArtistName typesquare_option"]',
  1132. nextEpisode: '//div[@class="pageLeaveStoryBtnArea"]/p[1]/a',
  1133. prevEpisode: '//div[@class="pageLeaveStoryBtnArea"]/p[2]/a',
  1134. pankuzuUp: '//p/a[@class="pageComicImageLink" and text()="作品ページへ"]',
  1135. }, {
  1136. url: '//yanmaga.jp/columns',
  1137. sibling: '//figure/a/img|//div[contains(@class,"article-body")]/h2|//div[@class="article-body"]/div/strong',
  1138. nextEpisode: '//li[@class="mod-bottom-links-next"]/a/span[contains(text(),"次の記事を読む")]/..',
  1139. firstEpisode: '//li[1]/a[@class="ga-episode-link"]',
  1140. lastEpisode: '//a[@class="ga-episode-link"]/span[text()="最新話を読む"]|//a[@class="ga-episode-link" and contains(text(),"最新記事を読む")]', // 話一覧と漫画ページが一緒なので話移動してしまう
  1141. author: '//div/ul[@class="mod-author"]/li/a/h2|//div[1]/div[@class="episode-info"]/div[2]/ul/li[@class="episode-info-author"]/h2/a|//span[@class="writer ml-3"]|//ul[1]/li[@class="detailv2-outline-author-item"]/a/h2|//h1[@class="detail-header-title"]',
  1142. prevEpisode: '//li[@class="mod-bottom-links-prev"]/a',
  1143. pankuzuUp: '//li[@class="mod-bottom-links-index"]/a/span[contains(text(),"目次")]/..', //'//a[@class="series"]',
  1144. header: 'header',
  1145. fitFunc: () => { fitFuncA('header', '//figure/a/img', 400); },
  1146. insteadofClickFunc: (e) => { if (e.href) { location.href = e.href } else { e.click() } },
  1147. func: () => { //observeUrlChanged(runAtamadashi,799)
  1148. setInterval(() => { eleget0('//span[contains(text(),"もっと見る")]:visible')?.click() }, 1000)
  1149. },
  1150. }, {
  1151. url: '//yanmaga.jp/comics',
  1152. sibling: '//figure/a/img',
  1153. nextEpisode: '//li[@class="mod-bottom-links-next"]/a/span[contains(text(),"次の記事を読む")]/..',
  1154. firstEpisode: '//span[contains(text(),"1話から無料で読む")]', // 話一覧リンクと漫画ページが一緒なので→で話移動してしまう
  1155. lastEpisode: '//span[contains(@class,"mod-episode-point--free")]',
  1156. author: '//div/ul[@class="mod-author"]/li/a/h2|//div[1]/div[@class="episode-info"]/div[2]/ul/li[@class="episode-info-author"]/h2/a|//span[@class="writer ml-3"]|//ul[1]/li[@class="detailv2-outline-author-item"]/a/h2',
  1157. prevEpisode: '//li[@class="mod-bottom-links-prev"]/a',
  1158. pankuzuUp: '//li[@class="mod-bottom-links-index"]/a/span[contains(text(),"目次")]/..', //'//a[@class="series"]',
  1159. //fitFunc: () => { fitFuncA('header', '//figure/a/img', 400); },
  1160. //insteadofClickFunc: (e) => { if (e.href) { location.href = e.href } else { e.click() } },
  1161. func: () => { //observeUrlChanged(runAtamadashi,799)
  1162. setInterval(() => { let e = eleget0('//span[contains(text(),"もっと見る")][not (@data-wcs)]:visible')?.click() }, 1000)
  1163. setInterval(() => {
  1164. elegeta('//SPAN[@class="-cv-icon -cv-f-icon" and @data-icon="expand"][not(@data-wcs)]:visible').forEach(e => {
  1165. e.dataset.wcs = 1;
  1166. e.click()
  1167. })
  1168. }, 1000)
  1169. },
  1170. keyFunc: { key: "Escape", func: e => eleget0('//div/button/img[@class="ga-popup-close"]')?.click() },
  1171. }, {
  1172. url: '//renta.papy.co.jp/',
  1173. firstEpisode: '//span[@class="rent_btn_word" and text()="無料サンプル"]',
  1174. // author: '//span[@data-book="author"]/a',
  1175. }, {
  1176. url: '//wanibooks-newscrunch.com/',
  1177. firstEpisode: '//a[last()]/div[@class="m-articles-item__ttl"]/..|//a[text()="作品を読む"]',
  1178. lastEpisode: '//a[1]/div[@class="m-articles-item__ttl"]|//a[text()="作品を読む"]',
  1179. author: '//a[@class="article-header-authors__item c-author"]',
  1180. pankuzuUp: '//div[@class="c-btn c-btn--black u-mb20"]/a[text()="連載トップへ戻る"]',
  1181. }, {
  1182. url: '//sp.comics.mecha.cc/',
  1183. firstEpisode: '//a[@rel="nofollow" and @id="sampleBtn" and contains(text(),"無料試し読み")]',
  1184. author: '//a[@class="p-bookInfo_author"]',
  1185. }, {
  1186. url: '//jumpsq.shueisha.co.jp/',
  1187. firstEpisode: '//div[@class="btn"]/a/span[contains(text(),"試し読み")]/..',
  1188. author: '//section/div[@class="contents rensai"]/h2/em',
  1189. }, {
  1190. url: '//kc.kodansha.co.jp/',
  1191. firstEpisode: '//a[contains(text(),"試し読みする")]',
  1192. author: '//div[@class="author"]/a',
  1193. }, {
  1194. url: '//ebookstore.sony.jp/',
  1195. firstEpisode: '//a[@sample="1" and contains(text(),"試し読み")]',
  1196. }, {
  1197. url: '//sp.handycomic.jp/',
  1198. firstEpisode: '//a[@class="btn--base-bg-blue" and text()="無料試し読み"]',
  1199. author: '//div[@class="author-list"]/a',
  1200. }, {
  1201. url: '//note.com/',
  1202. sibling: '//img[@data-modal="true"]/../..',
  1203. author: '//div[@class="o-noteContentHeader__name"]/a',
  1204. // header:'//div[@class="o-navbarNoteDetail__body"]',
  1205. }, {
  1206. url: /\/\/tsumanne.net\/si\/data\/|\/\/tsumanne.net\/my\/data\//,
  1207. sibling: '.thre>a:first-child,.thre table:not(.ftbpu table,#pickbox table,#respopup_area table,.floated table)',
  1208. pankuzuUp: '//p/a[text()="「」ッチー"]',
  1209. disableSnapWhenPageIsClicked: 1,
  1210. }, {
  1211. url: '//.+.2chan.net/|//.{3}.ftbucket.info/scrapshot/|//anige.horigiri.net/|//.*.ftbucket.info/.*/cont/.*',
  1212. sibling: '.thre>a:first-child,.thre table:not(.ftbpu table,#pickbox table,#respopup_area table,.floated table)',
  1213. pankuzuUp: '//li[@class="catlink"]/a[text()="勢順"]', //'//li[@class="catlink"]/a[contains(text(),"カタログ")]',
  1214. header: '#site-identity',
  1215. //atamadashi: '//html/body/hr[2]',
  1216. disableSnapWhenPageIsClicked: 1,
  1217. }, {
  1218. url: '//comic.mf-fleur.jp/',
  1219. firstEpisode: '//div[@class="cb-story-links__item--title" and contains(text(),"第1話")]|.//div[@class="cb-story-links__item--title" and contains(text(),"第1回")]',
  1220. lastEpisode: '//div[last()]/div[@class="cb-story-links__item--title"]',
  1221. sibling: '//div[contains(@class,"acms-grid")]/div/img/..',
  1222. prevEpisode: '//div[2]/a[@class="manga-pager__btn _prev"]',
  1223. nextEpisode: '//div[@class="manga-pager"]/a[@class="manga-pager__btn _next"]',
  1224. pankuzuUp: '//div[@class="cb-buttons__list--text"]',
  1225. author: '//a[@class="cb-author__link"]',
  1226. }, {
  1227. url: '//kuzure.but.jp/',
  1228. sibling: '.thre,.thre table:not(.ftbpu table,#pickbox table,#respopup_area table,.floated table)',
  1229. pankuzuUp: '//a[text()="[HOME]"]',
  1230. disableSnapWhenPageIsClicked: 1,
  1231. }, {
  1232. url: '//www.comicgum.com/',
  1233. firstEpisode: '//ul[@class="comicsmall"]/li[last()]/a/h3',
  1234. lastEpisode: '//a[@class="overlay"]/h3[text()="最新話を読む"]',
  1235. }, {
  1236. url: '//oshiete.goo.ne.jp/watch/',
  1237. header: '//header/div[@id="header"]',
  1238. firstEpisode: '//div[@class="writing_btn"]/a[text()="第1話から読む"]',
  1239. lastEpisode: '//li[1]/div[@class="writingList_inner"]/a/div[2]/h3[@class="writingList_title"]',
  1240. author: '//div[@class="writing_writer"]/a|//div[@class="profile_rt"]/h1[@class="profile_title"]',
  1241. nextEpisode: '//a[@class="nextRt" and text()="次の話"]',
  1242. prevEpisode: '//a[@class="prevLt" and text()="前の話"]',
  1243. sibling: '//p[@class="articleText comic_main_img"]/img',
  1244. pankuzuUp: '//h2[@class="comicProfile_title"]/a',
  1245. }, {
  1246. url: '//comip.jp/nekoyoko/',
  1247. sibling: '//div[@id="manga"]/canvas',
  1248. author: '//div[@class="comic-detail-content-right"]/h2',
  1249. nextEpisode: '//img[@class="btn-next-story"]|//img[@class="btn-next-story align-right"]',
  1250. prevEpisode: '//img[@class="btn-prev-story align-left"]|//img[@class="btn-prev-story"]',
  1251. }, {
  1252. url: '//piccoma.com/',
  1253. firstEpisode: '//a[@id="js_readFirstEpisode"]/span/..|//li[1]/a/div[@class="PCM-epList_ep"]/div[1]/h2|//a[contains(@class,"PCM-prdVol_readBtn")]/span[contains(text(),"試し読み")]',
  1254. lastEpisode: '//a[@id="js_readContinue"]/span',
  1255. author: '//ul[@id="js_author"]/li/a',
  1256. }, {
  1257. url: '//static.ichijinsha.co.jp/',
  1258. firstEpisode: '//p[2]/a[contains(text()," HTML5版でブックを開く")]',
  1259. pankuzuUp: '//p[@class="pagelist_link"]/a',
  1260. }, {
  1261. url: '//pokeman.jp/',
  1262. firstEpisode: '//div[1]/div/p/a[@class="manga-viwer-button"]',
  1263. pankuzuUp: '//a/span[text()="無料まんが"]',
  1264. }, {
  1265. url: '//comip.jp/spinel/',
  1266. firstEpisode: '//ul/li[1]/a/span[2]/span[@class="c-marker"]/../..',
  1267. lastEpisode: '//a[@class="works__new__button"]',
  1268. author: '//div[@class="works__title__inner"]/div/h3|//div[@class="cst_author"]',
  1269. }, {
  1270. url: '//pokeman.jp/',
  1271. firstEpisode: '//a[@class="manga-viwer-button" and contains(text(),"漫画の続きを読む")]',
  1272. }, {
  1273. url: '//comic.k-manga.jp/',
  1274. firstEpisode: '//a[@class="book-info--btn btn__secondary" and contains(text(),"無料試し読み")]|//a[@class="book-info--btn book-info--btn__jikuri"]/img|//div[@class="book-info--btn-wrap"]/a[@rel="nofollow" and contains(text(),"試し読み")]',
  1275. pankuzuUp: '//ol[@class="breadcrumb--target"]/li[last()-1]/a',
  1276. }, {
  1277. url: '//bookwalker.jp/',
  1278. firstEpisode: '//div[@class="main-cover-inner"]/span[text()="試し読み"]/../..|//a[@aria-label="試し読み"]/span[@class="btn-txt" and text()="試し読み"]',
  1279. author: '//a[@class="author-name"]',
  1280. }, {
  1281. url: '//bigcomicbros.net/',
  1282. firstEpisode: '//span[@class="btn-link__txt" and contains(text(),"試し読み")]',
  1283. author: '//p[@class="comic-detail-main__author"]',
  1284. }, {
  1285. url: /\/\/bigcomics\.jp\/series\/|\/\/kansai\.mag-garden\.co\.jp\/series\//,
  1286. lastEpisode: () => eleget0('//a[@class="series-ep-info-link" and contains(text(),"最新話から")]') || eleget0('//img[@class="lazyloaded mode-narrow" and @data-src="/images/icons/free_ja.svg"]') || eleget0('//span[@class="free-icon-new"]'),
  1287. firstEpisode: () => eleget0('//a[text()="はじめから読む(無料)"]') || eleget0('//div[1]/div/div[last()]/a[contains(text(),"作品をすべて見る")]') || eleget0('//a[contains(@class,"series-act-read-btn") and text()="はじめから読む"]') || eleget0('//div/h2[not(contains(text(),"この作品を読んだあなたにオススメ"))]/../../..//div[contains(@class,"manga-list")]/div[last()]/div[@class="store-box"]/div[2]/h2/a') || eleget0('//div/a[@class="g-btn mode-more"]') || eleget0('//div[last()]/div[1]/h2[@class="manga-title"]/a') || eleget0('//div[last()]/div[@class="store-box"]/div[2]/h2/a[not(ancestor::div[@id="recomend-series-list"])]') || elegeta('a#null-false.article-ep-list-item-img-link.click-link.g-episode-link-wrapper:has(span.free-icon-new):text*=第(1|一)(話|回)')?.shift() || eleget0('//a[contains(@class,"series-ep-info-link ") and contains(text()," 1 - ")]'),
  1288. /* }, {
  1289. url: '//bigcomics.jp/series/',
  1290. lastEpisode: () => eleget0('//a[@class="series-ep-info-link" and contains(text(),"最新話から")]') || eleget0('//img[@class="lazyloaded mode-narrow" and @data-src="/images/icons/free_ja.svg"]') || eleget0('//span[@class="free-icon-new"]'),
  1291. firstEpisode: () => eleget0('//a[text()="はじめから読む(無料)"]') || eleget0('//div[1]/div/div[last()]/a[contains(text(),"作品をすべて見る")]') || eleget0('//a[contains(@class,"series-act-read-btn") and text()="はじめから読む"]') || eleget0('//div/h2[not(contains(text(),"この作品を読んだあなたにオススメ"))]/../../..//div[contains(@class,"manga-list")]/div[last()]/div[@class="store-box"]/div[2]/h2/a') || eleget0('//div/a[@class="g-btn mode-more"]') || eleget0('//div[last()]/div[1]/h2[@class="manga-title"]/a') || eleget0('//div[last()]/div[@class="store-box"]/div[2]/h2/a[not(ancestor::div[@id="recomend-series-list"])]'),
  1292. */
  1293. author: '//span[@class="article-text"]',
  1294. sibling: 'div.row.row2-line img.manga2-img,div.row.row2-line img.manga-web-img',
  1295. prevEpisode: '//a[@class="click-link" and text()=" 前話"]|//a[@data-event-detail="article-next-page"]/div[@class="ep-f-nav-h" and contains(text(),"前の話")]',
  1296. nextEpisode: '//span[@class="title-next"]|//*/div[@class="ep-f-nav-h" and text()="次の話"]',
  1297. pankuzuUp: '//a[@class="a-series-title"]|//div[@class="col-sm-9 col-xs-8 series-user-box"]/a/span[@class="article-text"]|//div/div[@class="content-box-inner"]/div/div[last()]/div[@class="col-xs-12"]/a[text()="戻る"]|//div[@class="series-h"]/div/div/div[@class="series-h-credit-user"]/a/span',
  1298. fitFunc: () => { fitFuncA('header', 'div.row.row2-line img.manga2-img,div.row.row2-line img.manga-web-img', 400, null, 'footer:inscreen'); },
  1299. scrollSpeed: 2,
  1300. header: 'header',
  1301. atamadashi: '//div/img[@class="prof-h-icon-img"]',
  1302. }, {
  1303. url: '//sp.comics.mecha.cc/',
  1304. firstEpisode: '//a[@class="btnBlue" and text()="第1話を読む"]',
  1305. lastEpisode: '//ul[@class="listNews"]/li[1]/a/div/div/p[@class="listArticleTitle"]',
  1306. sibling: '//div[@class="comic_content_area"]/p/img/..',
  1307. header: '//ul[@class="mechamaga_nav"]',
  1308. prevEpisode: '//div[1]/div/ul/li[@class="prev"]/a',
  1309. nextEpisode: '//div[2]/div/ul[@class="comic_paging"]/li[@class="next"]/a',
  1310. author: '//p[@class="short_comic_author"]/a',
  1311. }, {
  1312. url: '//vw.mangaz.com/',
  1313. firstEpisode: '//a[@class="btn" and text()="すぐに読む"]',
  1314. pankuzuUp: '//ul/li[@class="btnEnd"]/a/span[text()="本を閉じる"]',
  1315. }, {
  1316. url: '//www.mangaz.com/',
  1317. firstEpisode: '//button[@class="open-viewer book-begin" and contains(text(),"無料で読む")]|//button[@class="open-viewer series-begin ga" and text()="最初から読む"]|.//p/button[@type="button" and @class="open-viewer book-begin ga" and contains(text(),"無料で読む")]',
  1318. nextEpisode: '//p[@class="nextBtnModBtn"]/a[@target="mangaz-viewer"]',
  1319. author: '//div[@class="bookHeadDetail"]/ul/li/h2/a|//div[3]/div[@class="header"]/ul/li[1]/a|//section[@class="head"]/h1[@class="authorName"]',
  1320. pankuzuUp: '//div[@class="rightMod"]/ul/li/a[text()="書誌に戻る"]|//div[@class="topicPath"]/ul/li[2]/a',
  1321. moveEpisodeFunc: (e) => { if (e.dataset.url || e.href) { location.href = e.dataset.url || e.href; } else { e.click() } }, // mangazのためだけの処理
  1322. }, {
  1323. url: '//www.cmoa.jp/',
  1324. firstEpisode: '//div[@class="btn2_area_btn3 GA_free"]|//a/div[@class="btn2_area_btn1 GA_free"]|//div[@class="btn2_area_btn4 GA_free"]',
  1325. author: '//div[@class="title_details_author_name"]/a',
  1326. }, {
  1327. url: '//j-nbooks.jp/',
  1328. lastEpisode: '//a[@class="button btn_main" and text()="最新話を読む"]',
  1329. firstEpisode: '//a[@class="button btn_main" and text()="1話目を読む"]',
  1330. nextEpisode: '//a[@class="linkToNext"]',
  1331. pankuzuUp: '//div[@class="container"]/div/a[text()="作品ページへ戻る"]',
  1332. disableSnapWhenPageIsClicked: 1,
  1333. registFunc: () => { $(document).keydown(e => { if (e.keyCode == 37) { $(eleget0('//div[contains(@class,"swiper-button-next swiper-button-black") and @role="button" and @aria-label="Next slide"]')).click(); } else if (e.keyCode == 39) { $(eleget0('//div[@class="swiper-button-prev swiper-button-black" and @aria-label="Previous slide"]')).click(); } }) },
  1334. }, {
  1335. url: '//www.lezhin.com/',
  1336. firstEpisode: '//div[@class="comicInfo__btns"]/a[text()="最初から読む"]',
  1337. author: '//div[@class="comicInfo__artist"]/a',
  1338. pankuzuUp: '//a[contains(@class,"vh__episodeLink")]',
  1339. }, { //
  1340. url: '//animesoku.com/',
  1341. sibling: '.t_b,.article-title,.comment-info,.article-body-inner',
  1342. disableSnapWhenPageIsClicked: 1,
  1343. }, { //
  1344. url: '//matome.usachannel.info/*',
  1345. sibling: '.matome,.entry-title',
  1346. disableSnapWhenPageIsClicked: 1,
  1347. }, { //
  1348. url: '//iroirosokuhou.com/|//chansoku.com/',
  1349. sibling: '.t_h,.article-header,.comment-info',
  1350. disableSnapWhenPageIsClicked: 1,
  1351. }, {
  1352. url: '//dot.asahi.com/',
  1353. firstEpisode: '//li[last()]/article/div/a/h2[@class="comicAuthorListTitle"]/..',
  1354. lastEpisode: '//li[1]/article/div/a/h2[@class="comicAuthorListTitle"]',
  1355. sibling: '//div[@class="comicAtclAreaPhoto"]/img/..',
  1356. nextEpisode: '//li[@class="comicArticlePagerNext"]/a',
  1357. prevEpisode: '//li[@class="comicArticlePagerPrev"]/a',
  1358. pankuzuUp: '//li[@class="comicArticlePagerTop"]/a',
  1359. author: '//div[@class="articlProfileInfo"]/p[@class="articlProfileNameTxt"]/a|//p[@class="comicAuthorNameTxt"]',
  1360. }, {
  1361. url: '//kidsna.com/',
  1362. lastEpisode: '//ul/li[1]/div[@class="articlelist-content"]/div/a/h2',
  1363. firstEpisode: '//ul/li[last()]/div[@class="articlelist-content"]/div/a/h2',
  1364. author: '//div[@class="article-item-kidsna-link-publisher"]/div/div[@class="article-item-kidsna-link-title"]/p',
  1365. }, { //
  1366. url: '//4komagram.com/',
  1367. sibling: '//div[@class="p-users-profile__posts"]/article',
  1368. header: '//header',
  1369. disableSnapWhenPageIsClicked: 1,
  1370. author: '//h2[@class="p-users-profile__head__title u-align-center"]',
  1371. }, {
  1372. url: '//margaretbookstore.com/',
  1373. firstEpisode: '//li[last()]/div[@class="bookItemStory"]/div[last()]/a',
  1374. lastEpisode: '//li[1]/div[@class="bookItemStory"]/div/a',
  1375. }, {
  1376. url: '//curazy.com/manga/',
  1377. firstEpisode: '//ul[@class="manga_tabContent_list"]/li[1]/a[@class="list_item_episode_stories"]/span[2]',
  1378. lastEpisode: '//ul[@class="manga_tabContent_list"]/li[last()]/a/span[2]',
  1379. author: '//div[@class="manga_mainContent manga_mainContent_basicInfoWrap"]/dl[1]/dd/a/span',
  1380. }, {
  1381. url: '//mavo.takekuma.jp/',
  1382. firstEpisode: '//a[last()]/li/div/p[@class="mangatitle"]',
  1383. lastEpisode: '//ul[@class="manga"]/a[1]/li/div/p[@class="mangatitle"]',
  1384. sibling: '//img[@class="protector"]/..',
  1385. header: '//html/body/nav[@id="header"]/div[@id="menu"]',
  1386. pankuzuUp: '//div[@id="slide"]/div/a/img[@alt="タイトルへ戻る"]',
  1387. }, {
  1388. url: '//getnavi.jp/category/comic/|//getnavi.jp/comic/',
  1389. firstEpisode: '//div[last()]/div[@class="category-color-before-comic"]/div[2]/a',
  1390. lastEpisode: '//div[1]/div[@class="category-color-before-comic"]/div[2]/a',
  1391. sibling: '//img/..',
  1392. author: '//p[@class="name"]/a[@rel="author"]',
  1393. pankuzuUp: '//div[@class="inner"]/div[@class="entry-content more"]/blockquote/p/a',
  1394. }, {
  1395. url: '//kansai.mag-garden.co.jp/',
  1396. firstEpisode: '//div[@class="entry_contents multiple"]/div[2]/div[2]/ul[@class="btn"]/li[1]/a/span/..|//div[@id="back_number"]/div[last()]/div/ul/li/a|.//li[@class="btn_pink"]/a/span[contains(text(),"読切を読む")]',
  1397. lastEpisode: '//div/div[@class="entry_box"]/div[2]/div[last()]/div[last()]/ul/li[1]/a/span',
  1398. }, {
  1399. url: '//booklive.jp/',
  1400. firstEpisode: '//div[@class="product_actions"]/ul[last()]/li[2]/a/span[text()="ブラウザ試し読み"]|//ul[@class="sub_actions clearfix"]/li[last()]/a/span[text()="無料で読む"]|//div[@id="product_area1"]/div/div/ul/li/a/span[contains(text(),"無料で読む")]',
  1401. }, { // ニコニコ静画(漫画)
  1402. url: '//manga.nicovideo.jp/watch/|//manga.nicovideo.jp/comic/|//manga.nicovideo.jp/manga/list',
  1403. // sibling: '//div[@class="pages"]/ul/li',
  1404. sibling: 'div.pages ul li.page',
  1405. // header: '//div[@class="common-header-cdesjj"]|//div[@class="detail_inner"]/div[3]/section[@id="ko_head_bar_min"]', //'//body/div[@id="CommonHeader"]/div/div',
  1406. header: '.common-header-cdesjj,detail_inner>div #ko_head_bar_min', //'//body/div[@id="CommonHeader"]/div/div',
  1407. atamadashi: '//div[@class="pages"]/ul/li',
  1408. author: '//div[@class="author"]/h3/span|//span[@class="author_name"]|//span[@class="author_info"]/div[@class="name"]/a', // Amazonを基点に~の管轄
  1409. firstEpisode: '//a[@class="first"]',
  1410. lastEpisode: '//a[@class="last"]',
  1411. prevEpisode: '//p[@class="prev"]/a',
  1412. nextEpisode: '//span[@class="next_text"]|//a[@class="next"]',
  1413. pankuzuUp: '//div/div/div[@class="title"]/h1/span[@class="manga_title"]/a[1]|//a/span[@class="author_name"]|//div[contains(@class,"mg_author_inner inner")]/div[@class="author_list"]/div[@class="author"]/div[last()]/div[1]/span/div/a[@class="sakushaantenna"]/font',
  1414. fitFunc: lh("\/comic\/") ? null : () => {
  1415. // fitFuncA('//div/div[@class="common-header-cdesjj"]|//section[@id="ko_head_bar_min"]', 'li canvas:not(.spread canvas),#page_contents img:not(.spread img):inscreen', 400);
  1416. fitFuncA('//div/div[@class="common-header-cdesjj"]|//section[@id="ko_head_bar_min"]', 'li canvas,#page_contents img:not(.spread img):inscreen', 400);
  1417. /*
  1418. var fitf = (f = 0) => {
  1419. var mh = "calc(100vh - 12px - " + (elegeta('//div/div[@class="common-header-cdesjj"]|//section[@id="ko_head_bar_min"]').reduce((a, b) => Math.max(a, ((b?.getBoundingClientRect()).bottom)), 0)) + "px)";
  1420. elegeta('li canvas:not(.spread canvas),#page_contents img:not(.spread img):inscreen').filter(e => f || e.style.maxHeight != mh).forEach(e => {
  1421. e.style.width = "auto";
  1422. e.style.maxHeight = mh
  1423. })
  1424. }
  1425. document.addEventListener("scroll", fitf);
  1426. setInterval(() => fitf(1), 400)
  1427. fitf();*/
  1428. },
  1429. }, {
  1430. url: '//crea.bunshun.jp/',
  1431. firstEpisode: '//li[last()]/a/p[@class="title"]',
  1432. lastEpisode: '//li[1]/a/p[@class="title"]',
  1433. author: '//div[@class="box cf"]/div/h2[@class="name"]|//div[1]/div[@class="cf"]/p[@class="text-right"]',
  1434. sibling: '//figure[@class="image-area figure-center"]|//article/figure[@class="image-area figure-center notdisplay"]/img/..',
  1435. header: '//header[@id="header"]',
  1436. }, {
  1437. url: '//www.gentosha.jp/series/|//www.gentosha.jp/article/',
  1438. firstEpisode: '//div[@class="btnStyle01"]/a[text()="第1回から読む"]',
  1439. lastEpisode: '//article[1]/a/div/h2[@class="title"]',
  1440. author: '//ul[@class="authorList"]/li/label/cite',
  1441. sibling: '//div[@id="content"]/div/div[1]/p/img/..|//div[@class="figure-center"]/img/..',
  1442. nextEpisode: '//div[contains(@class,"seriesLink")]/ul/li[last()]/a',
  1443. prevEpisode: '//div/div[contains(@class,"seriesLink")]/ul/li[1]/a',
  1444. pankuzuUp: '//div[@id="container"]/div[@id="topicPath"]/ol/li[3]/a',
  1445. fitFunc: () => { fitFuncA('', 'div.articleDetail > p > img', 400); },
  1446. }, {
  1447. url: '//ddnavi.com/',//url: '//ddnavi.com/serial',
  1448. sibling: ':is(div.article-body__main div figure img , img.size-full):not(div.biblio-item.clearfix.articletop.nobw * , div.clearfix > figure > a > img)',
  1449. nextEpisode: () => eleget0('//p/a[contains(text(),">> 次のページに続く")]') || eleget0('//div[contains(@class,"pager")]/div/a[contains(text(),">> 次のページに続く")]') || eleget0('//a[@class="next" and text()="次の回"]'),
  1450. prevEpisode: () => eleget0('//a[@class="prev" and contains(text(),"前の回")]') || eleget0('//a[@rel="prev"]'),
  1451. firstEpisode: '//li[1]/a/span[@class="badge-number"]',
  1452. lastEpisode: '//a/span[@class="badge-number" and text()="最新話"]',
  1453. pankuzuUp: '//ol[@class="breadcrumb"]/li[3]/a/span[@itemprop="name"]',
  1454. author: '//span[@itemprop="author"]/span|//h1[@class="archives-title"]',
  1455. fitFunc: () => { fitFuncA('', 'div.article-body__main div figure img , img.size-full', 400); },
  1456. }, {
  1457. url: '//www.sukima.me/',
  1458. firstEpisode: '//button[@type="button" and contains(text(),"最初から読む")]|//button[text()="試し読み"]|//button[text()="期間限定無料で読む"]|//button[text()="¥0で読む"]|//span[contains(@class,"v-btn__content")]/p[contains(text(),"最初から読む(登録不要)")]',
  1459. author: '//a[@class="author"]',
  1460. nextEpisode: '//a[@class="js-ripple chaptEndNavi__page__next--free"]|//div[@class="chaptEndNavi__page"]/a[1]', //'//i[@class="material-icons" and text()="menu"]|.//div[@class="chaptEndNavi__page"]/a[1]',
  1461. pankuzuUp: '//div[@class="golinks border-left"]/a[last()]|//li[last()]/a[@class="v-breadcrumbs__item"]|//a[@class="chaptEndNavi__page__next--last js-ripple"]',
  1462. delay: 500,
  1463. }, {
  1464. url: '//omocoro.jp/writer',
  1465. lastEpisode: '//div[@class="details"]/div[3]/a[contains(text(),"漫画")]',
  1466. firstEpisode: '//div[last()]/div[last()]/div[3]/a[contains(text(),"漫画")]',
  1467. }, {
  1468. url: '//sportsbull.jp/',
  1469. firstEpisode: '//div[last()]/ul/li[last()]/div/div[2]/a[contains(text(),"読む!")]',
  1470. lastEpisode: '//a[@data-is-free="1" and @class="comics_btn" and text()="読む!"]',
  1471. }, {
  1472. url: '//comic-zenon.com/episode/',
  1473. author: '//h2[@class="series-header-author"]',
  1474. }, {
  1475. url: '//comic-medu.com/', ////div[1]/a[@class="series-ep-info-link" and contains(text(),"最新話から")]
  1476. lastEpisode: () => eleget0('//a[@class="series-ep-info-link" and contains(text(),"最新話から")]') || eleget0('//img[@class="lazyloaded mode-narrow" and @data-src="/images/icons/free_ja.svg"]') || eleget0('//span[@class="free-icon-new"]'),
  1477. firstEpisode: () => eleget0('//a[text()="はじめから読む(無料)"]') || eleget0('//div[1]/div/div[last()]/a[contains(text(),"作品をすべて見る")]') || eleget0('//a[contains(@class,"series-act-read-btn") and text()="はじめから読む"]') || eleget0('//div/h2[not(contains(text(),"この作品を読んだあなたにオススメ"))]/../../..//div[contains(@class,"manga-list")]/div[last()]/div[@class="store-box"]/div[2]/h2/a') || eleget0('//div/a[@class="g-btn mode-more"]') || eleget0('//div[last()]/div[1]/h2[@class="manga-title"]/a') || eleget0('//div[last()]/div[@class="store-box"]/div[2]/h2/a[not(ancestor::div[@id="recomend-series-list"])]'),
  1478. author: '//span[@class="article-text"]',
  1479. sibling: 'div.row.row2-line img.manga2-img,div.row.row2-line img.manga-web-img',
  1480. prevEpisode: '//a[@class="click-link" and text()=" 前話"]|//a[@data-event-detail="article-next-page"]/div[@class="ep-f-nav-h" and contains(text(),"前の話")]',
  1481. nextEpisode: '//span[@class="title-next"]|//*/div[@class="ep-f-nav-h" and text()="次の話"]',
  1482. pankuzuUp: '//a[@class="a-series-title"]|//div[@class="col-sm-9 col-xs-8 series-user-box"]/a/span[@class="article-text"]|//div/div[@class="content-box-inner"]/div/div[last()]/div[@class="col-xs-12"]/a[text()="戻る"]|//div[@class="series-h"]/div/div/div[@class="series-h-credit-user"]/a/span',
  1483. fitFunc: () => { fitFuncA('header', 'div.row.row2-line img.manga2-img,div.row.row2-line img.manga-web-img', 400, null, 'footer:inscreen'); },
  1484. scrollSpeed: 2,
  1485. header: 'header',
  1486. atamadashi: '//div/img[@class="prof-h-icon-img"]',
  1487. /*
  1488. firstEpisode: '//div[@class="btDetail"]/a[@class="btDetailL" and contains(text(),"第1話")]|//ul[@class="episode"]/li[1]/a|//div[3]/a[@class="btDetailR" and text()="読む"]',
  1489. lastEpisode: '//a[@class="btDetailR" and text()="最新話"]|//a[@class="btDetailR" and text()="最新回を読む"]',
  1490. author: '//div[@class="author"]/div/h3',
  1491. pankuzuUp: '//div[@class="storyDrawer"]/div[2]/a',*/
  1492. }, {
  1493. url: '//csbs.shogakukan.co.jp/book',
  1494. firstEpisode: '//a[@class="button is-link"]/span[contains(text(),"試し読み")]|//a[@class="button is-link"]/span/em[contains(text(),"まるごと試し読み")]',
  1495. author: '//dl[1]/dd[@class="column"]/ul/li/a',
  1496. }, {
  1497. url: '//sonorama.asahi.com/',
  1498. firstEpisode: '//li[last()]/div[@class="series_comic_btn"]/a',
  1499. lastEpisode: '//li[1]/div[@class="series_comic_btn"]/a',
  1500. author: '//div[@class="m10 comic"]/div/a',
  1501. leftKey: '//button[@class="slick-next"]',
  1502. rightKey: '//button[@class="slick-prev"]',
  1503. nextEpisode: '//ul[@class="comicViewer_nav_list"]/li/a[text()="次話"]',
  1504. prevEpisode: '//ul[@class="comicViewer_nav_list"]/li/a[text()="前話"]',
  1505. pankuzuUp: '//ul[@class="comicViewer_nav_list"]/li/a[text()="一覧へ"]',
  1506. }, {
  1507. url: '//www.yatate.net/',
  1508. firstEpisode: '//li[last()]/article/div[@class="detail"]/h1/a',
  1509. lastEpisode: '//li[1]/article/div[@class="detail"]/h1/a',
  1510. }, {
  1511. url: '//comic-polaris.jp/',
  1512. firstEpisode: '//a[text()="第1話を読む"]|//div[@class="latest_info_link_btn01"]/a[text()="読み切りを読む"]',
  1513. lastEpisode: '//a[text()="最新話を読む"]',
  1514. author: '//div[@class="work_author_intro_name"]',
  1515. }, {
  1516. url: '//bunshun.jp/',
  1517. firstEpisode: '//li[last()]/div/h3[@class="title"]/a',
  1518. lastEpisode: '//p[@class="latest-link"]/a',
  1519. author: '//div/p[@class="name"]|//div/div[@class="author-box"]/p[@class="author"]/a',
  1520. sibling: '//div[@class="image-with-link"]/a/img/../../..',
  1521. nextEpisode: '//a[@class="arrow" and text()="NEXT"]',
  1522. prevEpisode: '//div[@class="prev"]/a[@class="arrow"]',
  1523. pankuzuUp: '//div[@class="series-title"]/h2/a',
  1524. }, {
  1525. url: '//sokuyomi.jp/',
  1526. firstEpisode: '//div[2]/a[contains(text(),"無料で読む")]|//div[@id="AP_thumb_area"]/a[text()="試し読み"]',
  1527. //author: '//div[@class="author"]/a',
  1528. }, {
  1529. url: '//cbiz.shueisha.co.jp/',
  1530. firstEpisode: '//ul[@class="pageLink"]/li/a[text()="第1話を読む"]',
  1531. lastEpisode: '//ul[@class="pageLink"]/li/a[contains(text(),"最新話を読む")]',
  1532. author: '//main[@class="sblab"]/section[@class="read"]/em',
  1533. }, {
  1534. url: '//mankai.jp/',
  1535. firstEpisode: '//ul/li[1]/a[@class="js-viewerlink"]/h3/..',
  1536. lastEpisode: '//ul/li[last()]/a[@class="js-viewerlink"]/h3',
  1537. pankuzuUp: '//button[@value="作品一覧に戻る"]|//a[@class="gbFooterListLink" and contains(text(),"作品一覧")]',
  1538. author: '//p[@class="modProfileArtistName"]',
  1539. }, {
  1540. url: '//books.vipdoor.info/',
  1541. firstEpisode: '//dl[@id="comic-parts"]/dd[1]/ol/li[1]/a',
  1542. lastEpisode: '//dd[last()]/ol[@class="comic-part-pages"]/li[last()]/a',
  1543. nextEpisode: '//a[@rel="next"]',
  1544. prevEpisode: '//a[@rel="prev"]',
  1545. sibling: '//div[@id="article"]/ol/li/a/img',
  1546. pankuzuUp: '//a[@class="page-nav-link"]',
  1547. }, {
  1548. url: /https:\/\/younganimal\.com\/series\/|\/\/(?:magazine\.)?comici\.jp\/|\/\/ebookstore\.corkagency\.com\//,
  1549. lastEpisode: () => eleget0('//a[@class="series-ep-info-link" and contains(text(),"最新話から")]') || eleget0('//img[@class="lazyloaded mode-narrow" and @data-src="/images/icons/free_ja.svg"]') || eleget0('//span[@class="free-icon-new"]'),
  1550. firstEpisode: () => eleget0('//a[text()="はじめから読む(無料)"]') || eleget0('//div[1]/div/div[last()]/a[contains(text(),"作品をすべて見る")]') || eleget0('//a[contains(@class,"series-act-read-btn") and text()="はじめから読む"]') || eleget0('//div/h2[not(contains(text(),"この作品を読んだあなたにオススメ"))]/../../..//div[contains(@class,"manga-list")]/div[last()]/div[@class="store-box"]/div[2]/h2/a') || eleget0('//div/a[@class="g-btn mode-more"]') || eleget0('//div[last()]/div[1]/h2[@class="manga-title"]/a') || eleget0('//div[last()]/div[@class="store-box"]/div[2]/h2/a[not(ancestor::div[@id="recomend-series-list"])]') || elegeta('a#null-false.article-ep-list-item-img-link.click-link.g-episode-link-wrapper:has(span.free-icon-new):text*=第(1|一)(話|回)')?.shift() || eleget0('//a[contains(@class,"series-ep-info-link ") and contains(text()," 1 - ")]'),
  1551. author: '//span[@class="article-text"]',
  1552. sibling: 'div.row.row2-line img.manga2-img,div.row.row2-line img.manga-web-img',
  1553. prevEpisode: '//a[@class="click-link" and text()=" 前話"]|//a[@data-event-detail="article-next-page"]/div[@class="ep-f-nav-h" and contains(text(),"前の話")]',
  1554. nextEpisode: '//span[@class="title-next"]|//*/div[@class="ep-f-nav-h" and text()="次の話"]',
  1555. pankuzuUp: '//a[@class="a-series-title"]|//div[@class="col-sm-9 col-xs-8 series-user-box"]/a/span[@class="article-text"]|//div/div[@class="content-box-inner"]/div/div[last()]/div[@class="col-xs-12"]/a[text()="戻る"]|//div[@class="series-h"]/div/div/div[@class="series-h-credit-user"]/a/span',
  1556. fitFunc: () => { fitFuncA('header', 'div.row.row2-line img.manga2-img,div.row.row2-line img.manga-web-img', 400, null, 'footer:inscreen'); },
  1557. scrollSpeed: 2,
  1558. header: 'header',
  1559. atamadashi: '//div/img[@class="prof-h-icon-img"]',
  1560. }, {
  1561. url: '//pachikuri.jp/',
  1562. firstEpisode: '//div[@class="sakuhinFuncs__btnFirst"]/a',
  1563. lastEpisode: '//div[@class="sakuhinFuncs__btnLatest"]/a',
  1564. sibling: '//main[@id="js-manga"]/img|//main/span[@class="not_resizing"]/img',
  1565. author: '//span[@class="sakuhinDtails__author"]|//div[@class="headline__txt__author--mangaHead"]',
  1566. nextEpisode: '//a[contains(text(),"次の話へ")]',
  1567. prevEpisode: '//a[@class="mangaFuncs__btn mangaFuncs__btn--prev"]',
  1568. pankuzuUp: '//a[contains(text(),"作品紹介ページへもどる")]',
  1569. }, {
  1570. url: '//kinmaweb.jp/',
  1571. sibling: '//div/a[@class="no-icon"]/img/..',
  1572. }, { //
  1573. url: '//kodansha-cc.co.jp/',
  1574. firstEpisode: '//dl[last()]/dd/div/div[@class="pcv"]/a/div[@class="comic-more"]',
  1575. lastEpisode: '//dl[1]/dd/div[@class="smanone2"]/div/a/div[@class="comic-more"]',
  1576. author: '//div[@id="seriesHeader"]/ul/li'
  1577. }, {
  1578. url: '//www.gamespark.jp/',
  1579. firstEpisode: '//div[@class="news-list"]/section[last()]/a[@class="link"]',
  1580. lastEpisode: '//div[@class="news-list"]/section[1]/a[@class="link"]',
  1581. sibling: '//article/div[@class="txt-center"]/a/img/..|//a/img[@class="inbody-img"]/..|//article/div[@class="txt-center"]',
  1582. header: '//header[@class="thm-header"]/nav',
  1583. pankuzuUp: '//div/article[contains(@class,"arti-body cf cXenseParse")]/div/a/b',
  1584. disableSnapWhenPageIsClicked: 1,
  1585. }, {
  1586. url: '//www.mangabox.me/special/',
  1587. firstEpisode: '//ul[@class="episodes_list"]/li[1]/a/div/div/span[1]',
  1588. lastEpisode: '//li[last()]/a/div/div/span[@class="episodes_strong_text is_new"]',
  1589. }, {
  1590. url: '//nikkangecchan.jp/',
  1591. firstEpisode: '//div[@class="button"]/a[text()="1話から読む"]',
  1592. lastEpisode: '//div[contains(@class,"btnBox")]/div/a[text()="最新話を読む"]',
  1593. author: '//div[@class="author"]'
  1594. }, {
  1595. url: '//mangalifewin.takeshobo.co.jp/',
  1596. lastEpisode: '//div[@class="bookR"]/ul/li/a',
  1597. firstEpisode: '//ul[@class="bookul"]/li[last()]/div[@class="bookR"]/ul/li[last()]/a',
  1598. author: '//div/div/div/div[@class="cOutlineInnerInner"]/p[1]',
  1599. prevEpisode: '//ul/li[@class="prev"]/a',
  1600. sibling: 'div.img img',
  1601. header: '#headerAreaOuter,#headerAreaSection',
  1602. pankuzuUp: '//a[contains(text(),"一覧に戻る")]',
  1603. fitFunc: () => fitFuncA('#headerAreaOuter,#headerAreaSection', 'div.img img', 400),
  1604. }, {
  1605. url: '//medibang.com/',
  1606. firstEpisode: '//div[last()]/div/div[last()]/a[@class="btn read"]|//li/div/a[@class="jq_readFixed" and contains(text(),"WEBで読む")]',
  1607. lastEpisode: '//div[1]/div/div[@class="btn_area"]/a[@class="btn read"]',
  1608. }, {
  1609. url: '//debut.shonenmagazine.com/',
  1610. firstEpisode: '//div[last()]/div/div[@class="card-cmn-comic-in"]/div[@class="box-detail"]/div/a[@class="box-detail__link-group"]/h3/span',
  1611. lastEpisode: '//div[1]/div/div[@class="card-cmn-comic-in"]/div/div/a[@class="box-detail__link-group"]/h3/span',
  1612. author: '//div[@class="box-profile-small-01"]/div[@class="txt-normal"]/a'
  1613. }, {
  1614. url: '//ashitano.tonarinoyj.jp/',
  1615. firstEpisode: '//div[@id="contributor-work-list-theme-item-wrap"]/section[last()]/a/h3/span/../..|//section[1]/a/div/p[@class="series-episode-number"]|//div[last()]/section[@class="contributor-work-item"]/a/div/div[1]/h3/span',
  1616. lastEpisode: '//section[@id="contributor-work-list"]/div[1]/section/a/div/div/h3/span|//section[last()]/a/div[@class="series-item-status"]/p',
  1617. author: '//section[@class="contributor-profile js-contributor-profile"]/h1|//div/div[@class="series-contributor"]/a/p[@class="series-profile-name"]/span'
  1618. }, {
  1619. url: '//www.comic-ryu.jp/',
  1620. firstEpisode: '//div/div[@id="webcomic"]/div[last()]/a/span[last()]/..|//li[last()]/p[@class="readbtn"]/a',
  1621. lastEpisode: '//div/div[@id="webcomic"]/div[1]/a/span[last()]/..|//p[@class="readbtn"]/a/img[@alt="NEW"]/..', //)?.pop(), // 最後の1個を使用
  1622. nextPage: '//a[@id="NextLink" and @title="次ページ"]',
  1623. prevPage: '//a[@id="PrevLink" and @title="前ページ"]',
  1624. nextEpisode: '//div[@id="NextGo"]/a[@id="nextLast"]',
  1625. pankuzuUp: '//div[@id="toback"]/a[text()="作品ページへ戻る"]',
  1626. author: '//div[@id="profile"]/p[@class="name"]|//div/p[@class="name"]/span',
  1627. }, {
  1628. url: '//comip.jp/z/',
  1629. firstEpisode: '//div[@class="column_main"]/ul/li[last()]/div[@class="thumb"]/a',
  1630. lastEpisode: '//div[@class="column_main"]/ul/li[1]/div[@class="thumb"]/a',
  1631. author: '//div[@class="creator"]'
  1632. }, { // ツイ4(1)
  1633. url: '//sai-zen-sen.jp/comics/twi4/',
  1634. sibling: '//article',
  1635. //header: '//body/header/div[@class="hgroup"]',
  1636. atamadashi: '//article[last()]',
  1637. author: '//h3[1]/span[@class="work-author"]',
  1638. lastEpisode: '//article[last()]/header/div/h3',
  1639. fitFunc: () => {
  1640. setInterval(() => {
  1641. elegeta('//div[@class="pgroup"]/p/img').forEach(e => {
  1642. e.style.maxHeight = "calc(100vh - 12px - " + (eleget0('//body/header/div[@class="hgroup"]')?.offsetHeight) + "px)";
  1643. e.style.position = "initial";
  1644. })
  1645. }, 2999)
  1646. },
  1647. }, { // 花椿
  1648. url: '//hanatsubaki.shiseidogroup.jp/comic',
  1649. sibling: '//div/figure/img/../../../../../../../..', //'|//section/div',
  1650. header: '//div[@class="controller"]/div[1]',
  1651. author: '//div[@class="row text-center"]/div[@class="col col-8 col-sm-12 person"]/div[@class="grid"]/div[@class="row text-left"]/div[last()]/h4[1]'
  1652. }, { // web漫画アンテナ
  1653. url: '//webcomics.jp/',
  1654. sibling: '.entry',
  1655. header: '#header',
  1656. disableSnapWhenPageIsClicked: 1,
  1657. }, { // bokete
  1658. url: '//bokete.jp/',
  1659. sibling: 'div.ad_fourm_inarticle > main > div > div , div.ad_fourm_inarticle > div > div',
  1660. header: 'div#__next>div',
  1661. disableSnapWhenPageIsClicked: 1,
  1662. }, { //
  1663. url: '//ruijianime.com/',
  1664. sibling: '//div[@class="sm_one_tag_search recent_tag"]|//div[@class="sm_one"]',
  1665. disableSnapWhenPageIsClicked: 1,
  1666. }, { // コミックぜにょん
  1667. url: '//www.zenyon.jp/lib/',
  1668. sibling: '//div[@id="viewer_content"]/img',
  1669. nextEpisode: '//a/img[@class="btn_next"]/..',
  1670. author: '//p[@class="author"]',
  1671. firstEpisode: '//div/ul[@id="sakuhin_backnumber_ul"]/li[last()]/a[text()="1"]',
  1672. lastEpisode: '//p[@class="sakuhin_btn_new"]/a/img/..',
  1673. pankuzuUp: '//a/img[@alt="作品ページへ" and @class="btn_sakuhin"]/..',
  1674. }, { //
  1675. url: '//souffle.life/manga/',
  1676. sibling: 'div.sf-content_img img',
  1677. header: 'div#sf-scroll_header',
  1678. scrollSpeed: 2,
  1679. nextEpisode: '//span[@class="sf-next_btn"]/a',
  1680. prevEpisode: '//span[@class="sf-before_btn"]/a',
  1681. firstEpisode: '//section[1]/div[@class="sf-content sf-authors"]/section[@class="sf-content_books_related"]/div/article[3]/div/div[@class="sf-contents_book_read"]/a|//div[@class="sf-content_book_related"]/article[last()]/div/div[@class="sf-contents_book_read"]/a', ////article[last()]/div/div[@class="sf-contents_book_read"]/a',
  1682. lastEpisode: '//div[@class="alm-reveal"]/article[1]/div[@class="sf-content_book_description"]/div/a',
  1683. pankuzuUp: '//p[@class="sf-content_book_name"]/a',
  1684. author: '//span[@class="sf-author_name"]',
  1685. fitFunc: () => fitFuncA('div#sf-scroll_header', 'div.sf-content_img img', 400),
  1686. }, { //
  1687. url: '//souffle.life/author/',
  1688. firstEpisode: '//section[1]/div[@class="sf-content sf-authors"]/section[@class="sf-content_books_related"]/div/article[3]/div/div[@class="sf-contents_book_read"]/a', ////article[last()]/div/div[@class="sf-contents_book_read"]/a',
  1689. lastEpisode: '//div[@class="alm-reveal"]/article[1]/div[@class="sf-content_book_description"]/div/a',
  1690. author: '//span[@class="sf-author_name"]',
  1691. }, { //
  1692. url: '//www.moae.jp/comic/|.moae.jp/lineup/',
  1693. sibling: '//div[@class="img"]/a/img/../..',
  1694. lastEpisode: '//ul[@class="detail-trial"]/li[1]/a',
  1695. author: '//section/section[@class="mod-profile-block"]/dl/dt',
  1696. pankuzuUp: '//li[@class="lineup"]/a/img'
  1697. }, {
  1698. url: '//www.comic-essay.com/read/',
  1699. prevEpisode: '//a[@class="c-btn _btn-pager-left js-viewing-indelible" and text()="前の話へ"]',
  1700. nextEpisode: '//div/a[@class="c-btn _btn-pager-right js-viewing-indelible"]',
  1701. sibling: '//div[@class="episode-comic__image"]/img',
  1702. pankuzuUp: '//a[contains(text(),"作品詳細はこちら")]',
  1703. fitFunc: () => { fitFuncA('', '.episode-comic__image img:inscreen', 400); },
  1704. //fitFunc: () => { elegeta('.episode-comic__image img').forEach(e => e.style.maxHeight = "calc(100vh - 12px)") },
  1705. }, { // コミックエッセイ劇場
  1706. url: '//www.comic-essay.com/episode/|//www.comic-essay.com/links/',
  1707. firstEpisode: () => elegeta('//div[@class="episode-list__item--title"]').sort(CollEleText).shift(),
  1708. lastEpisode: '//div/ul[2]/li/a/div[@class="episode-list__item--title"]',
  1709. author: '//div[@class="episode-profile__item--name"]/a|//span[@class="episode-info__author--item"]/a|//div[@class="author-detail__name--main"]',
  1710. pankuzuUp: '//span[@class="episode-info__author--item"]/a',
  1711. }, { //
  1712. url: '//www.comic-essay.com/neko/',
  1713. sibling: '//article/div[@class="scene"]/img',
  1714. header: '//body/div[@id="pagetop"]/header',
  1715. nextEpisode: '//div[2]/ul/li[last()]/a[text()="次の話"]',
  1716. prevEpisode: '//div[@class="pagenation pc"]/ul/li/a[contains(text(),"前の話")]',
  1717. disableSnapWhenPageIsClicked: 1,
  1718. author: '//div[@class="txtarea"]/h4[@class="ttl-name"]',
  1719. firstEpisode: '//li[1]/a[@class="btn-episode"]/p/..',
  1720. lastEpisode: '//div[@class="episode-new"]/a/p|//li[last()]/a[@class="btn-episode"]/p/..',
  1721. pankuzuUp: '//div[@id="pagetop"]/ul/li[last()-1]/a',
  1722. }, { // 裏サンデー
  1723. url: '//urasunday.com/',
  1724. sibling: '//img[@class="dumimg"]/..',
  1725. // nextEpisode: '//div[@id="prBanner"]/a[contains(text(),"次の話を今すぐ読む!! →")]',
  1726. firstEpisode: '//div[@class="comicInner"]/ul[2]/li[1]/a',
  1727. lastEpisode: '//div[@class="comicButtonDateBox"]/a|//div[@class="chapter"]/ul/li[1]/a/div',
  1728. author: '//li[@class="detailComicTitle"]/h2|//div[@id="comicDetail"]/h2|//div[@class="author"]',
  1729. pankuzuUp: '//li/a[@href="../index.html"]',
  1730. func: () => {
  1731. addstyle.add(`#viewer { height: 100dvh !important; }`);
  1732. eleget0(`#viewer`)?.scrollIntoView()
  1733. },
  1734. // func: function() { $(eleget0('//div[@id="btn-scale"]/div[1]/div[text()="拡大"]')).click(); }
  1735. }, { // やわらかスピリッツ
  1736. url: '//yawaspi.com/',
  1737. sibling: '//div/div[@class="page__detail__vertical"]/div/ul/li/img/..|//section[@class="comicContainer"]/a/img[1]/..|//div[@class="vertical__inner"]/ul/li/img',
  1738. firstEpisode: '//section[@class="page__detail"]/div[@class="page__detail__inner"]/div[@class="detail__image"]/span|//ul[@class="inner__content"]/li[last()]/a/dl/dt',
  1739. lastEpisode: '//ul[@class="inner__content"]/li/a/dl/dt|//li[@class="-new"]/a/dl/dt',
  1740. author: '//li[@class="comicDetails"]/hgroup[1]/h2|//header[@class="header -page"]/div[@class="page__header"]/p/strong',
  1741. pankuzuUp: '//li[@class="browserCtrlLeft"]/a'
  1742. }, { // コミックバンチ
  1743. url: '//www.comicbunch.com/manga/',
  1744. sibling: '//div[@class="view"]/a/img/..|.//span[@class="guard_np"]/../..',
  1745. nextEpisode: '//ul[@class="btn cf"]/li/a[text()="次の話"]',
  1746. prevEpisode: '//ul[@class="btn cf"]/li/a[text()="前の話"]',
  1747. firstEpisode: '//div[@class="backnumber cf"]/ul/li[last()]/a',
  1748. lastEpisode: '//div[@class="backnumber cf"]/ul[@class="cf"]/li[1]/a',
  1749. author: '//div[@id="comics"]/h4|//div[@class="title"]/h3|//div/div[@class="title push"]/h3',
  1750. pankuzuUp: '//a[text()="作品紹介"]'
  1751. }, { // コミックDAYS他
  1752. url: '//comic-days.com/episode/|//tonarinoyj.jp/episode/|//shonenjumpplus.com/episode/|//kuragebunch.com/episode/|//pocket.shonenmagazine.com/episode/|//viewer.heros-web.com/episode/|//comic-action.com/episode/|//comic-gardo.com/episode/|//magcomi.com/episode/|//comic-ogyaaa.com/|//comic-trail.com/episode/', //'|//www.corocoro.jp/episode/',
  1753. author: '//h2[@class="series-header-author"]', //'//div/h2[@class="series-header-author"]'
  1754. rightKey: '//a[@class="previous-link js-add-query-parameter-from-to-uri"]',
  1755. sibling: () => !eleget0('body#page-viewer:inscreen') && elegeta('li.comment-container , a.series-episode-list-container'),
  1756. }, { // }, { //
  1757. url: '//ganma.jp/',
  1758. author: '//figure[@ng-if="magazine.author.isDefined"]/figcaption/h4[@class="ng-binding"]',
  1759. firstEpisode: '//li[1]/a[@class="detail-action-all"]|//li[@class="ng-scope"]/a[@class="detail-action-all ng-scope" and contains(text(),"第1話へ")]',
  1760. lastEpisode: '//ng-include/div[@class="story-right ng-scope" and @ng-if="item._story.releaseStart"]',
  1761. }, { //
  1762. url: '//www.sunday-webry.com/episode/',
  1763. author: '//div/h2[@class="series-header-author"]',
  1764. }, { //
  1765. url: '//rookie.shonenjump.com/series/|//rookie.shonenjump.com/users/',
  1766. author: '//span[@class="user-name"]/a/strong|//h2[@class="user-name"]|//p[2]/a/span[@class="user-name"]',
  1767. firstEpisode: '//li[1]/a/p[1]/span/../..',
  1768. lastEpisode: '//li[last()]/a/p[1]/span/../..',
  1769. // sibling: eleget0('.viewer-vertical') ? 'p.page-area.js-page-area img,a.button.next-episode-button' : "",
  1770. sibling: eleget0('.viewer-vertical') ? 'p.page-area.js-page-area img' : "",
  1771. pankuzuUp: '//a[contains(text(),"作品ページへ")]|//a/span[@class="series-title"]|//span[@class="user-name"]/a/strong',
  1772. nextEpisode: eleget0('.viewer-vertical') ? '//a[@class="button next-episode-button"]' : "",
  1773. leftKey: eleget0('.viewer-vertical') ? null : '//div/div[@class="page-upper"]/div/p/a[@class="button next-episode-button"]',
  1774. fitFunc: eleget0('.viewer-vertical') ? () => {
  1775. let mh = () => {
  1776. if (GF?.fitfuncBon === 0) return;
  1777. elegeta('p.page-area.js-page-area img:not([data-maxheightbackup])').forEach(e => {
  1778. e.dataset.maxheightbackup = e.style.maxHeight || "none";
  1779. e.style.width = "auto";
  1780. e.style.maxHeight = "calc(100vh - 18px)"; //e.animate([{maxHeight:"calc(100vh - 18px)"}],{duration:333,fill:"forwards"})
  1781. })
  1782. }
  1783. cbOnce(() => document.addEventListener("scroll", mh))
  1784. mh()
  1785. } : null, // 画面縦にフィット
  1786. }, { //
  1787. url: '//www.comico.jp/challenge/|//www.comico.jp/articleList',
  1788. author: '//p[contains(@class,"__author")]/a|//article/div/p[@class="user-comment02__name"]/a',
  1789. firstEpisode: '//ul/li[1]/a[@class="list-episode02__item-inner" and @data-articleno="1"]/div/p|//ul/li[1]/a[@class="btn03 btn03--white _nextArticleBtn" and text()="はじめから読む"]|//div[contains(@class,"list-episode02")]/ul[@class="list-episode02__list _articleList"]/li[1]/a/div/p',
  1790. lastEpisode: '//div[@class="stage__body stage__body--fixed-footer"]/div[2]/div[@class="stage__ly-col2-main stage__ly-col2-main--episode"]/div[last()]/ul/li[last()]/a[@class="list-episode02__item-inner"]/div[contains(@class,"list-episode02__body")]/p',
  1791. prevEpisode: '//a/img[@alt="前の話"]/..|//img[@alt="前の話"]',
  1792. nextEpisode: '//a/img[@alt="次の話"]/..|//img[@alt="次の話"]',
  1793. cancelScrollOnChangingEpisode: 1,
  1794. pankuzuUp: '//a[@class="comico-global-header02__list-nav-item-inner"]/i[@class="i-arrow-l i-arrow-l--large"]|//div[@class="article-hero03__body"]/p[1]/a[1]|//div/ul/li[@class="comico-global-header02__list-nav-item"]/a/i',
  1795. }, {
  1796. url: '//www.comico.jp/comic/',
  1797. firstEpisode: '//a[@class="link_first"]',
  1798. sibling: '//div[@class="canvas_wrapper"]/div',
  1799. lastEpisode: '//li[last()]/a/div[last()]/span[contains(text(),"無料")]',
  1800. author: '//div[1]/dl[@class="list_writer"]/dd',
  1801. nextEpisode: '//a[@class="link_continue"]',
  1802. //fitFunc: () => { fitFuncA(null, 'img,.wrap-canvas',400,()=>{elegeta('img,.wrap-canvas').forEach(e=>e.style.backgroundRepeat="no-repeat") } ), 0 },
  1803. }, { //
  1804. url: '//www.comico.jp/detail|//www.comico.jp/challenge/detail',
  1805. prevEpisode: '//a/img[@alt="前の話"]/..',
  1806. nextEpisode: '//a/img[@alt="次の話"]/..',
  1807. author: '//p[contains(@class,"__author")]/a',
  1808. pankuzuUp: '//a/img[@alt="話一覧"]/..',
  1809. }, { //
  1810. url: '//daysneo.com/works/',
  1811. author: '//div/p[@class="author"]/a[1]',
  1812. firstEpisode: '//li[1]/div[last()]/dl/dt/strong/a',
  1813. lastEpisode: '//li[last()]/div[last()]/dl/dt/strong/a',
  1814. pankuzuUp: '//a[text()="作品詳細ページへ"]',
  1815. nextEpisode: '//span[text()="次の話へ"]',
  1816. fitFunc: () => { fitFuncA('', '#fullpage .section img', 400); },
  1817. }, { //
  1818. url: '//ebookjapan.yahoo.co.jp/',
  1819. disableSnapWhenPageIsClicked: 1,
  1820. //func:()=>{setTimeout(()=>{let e=eleget0('//*[@class="header__title"]');if(e){document.title=e.innerText; } } ,2000)}, // 作品名をタブ名に入れる // できない
  1821. author: '//p[@class="book-main__author"]/a|//p[@class="book-main__author underline"]/a|//a[@class="contents-caption__author underline"]',
  1822. firstEpisode: '//a[@class="btn btn--primary btn--read" and text()="始めから読む"]|//a[@class="btn btn--primary btn--read btn--sub-text" and contains(text(),"無料")]|//a[@class="btn btn--primary btn--read btn--sub-text" and contains(text(),"試し読み")]|//li[last()]/div/div[@class="book-item__actions"]/a[contains(@class,"btn")]/strong[text()="無料"]|//a[@class="btn btn--primary btn--read"]|//div[@class="book-main__purchase"]/a[contains(text(),"試し読み")]|//a[@aria-current="page" and contains(text(),"始めから読む")]|//button[@type="button" and contains(text(),"始めから読む")]',
  1823. lastEpisode: '//li[1]/div[@class="book-item book-item--disp-list book-item--btn-include-single"]/div[2]/a/strong|//div[2]/ul/li[1]/button/span[contains(@class,"icon-btn__text") and contains(text(),"無料")]',
  1824. }, { //
  1825. url: '//mangacross.jp/comics/',
  1826. author: '//div[@class="comic-area__author"]|//p[@class="viewer-page__author"]|//section[@class="setting"]/div/div/div/div/h2[@class="comic-area__author"]|//h2[@class="comic-area__author"]',
  1827. firstEpisode: '//a[text()="1話から読む"]|//a[text()="第1話を読む"]|//li[last()]/a/div[@class="episode-list__number"]',
  1828. lastEpisode: '//a[text()="最新話を読む"]|//ul[@class="episode-list"]/li[1]/a/div[2]',
  1829. leftKey: '//div[@class="end-page__series-button end-page__series-button--green"]/a',
  1830. pankuzuUp: '//div[@class="end-page__series-button end-page__series-button--white"]/a',
  1831. func: () => {
  1832. waitAndDo(e => eleget0('button.viewer-button.viewer-button--max'), e => e?.click()) //真ん中の「すべてのフィルタ ツール」を左の箱に入れる
  1833. function waitAndDo(checkFunc, func) { // checkFuncがtrueになったらfuncを実行
  1834. let ret = checkFunc();
  1835. if (ret || ret?.length > 0) { func(ret) } else { setTimeout(waitAndDo, 333, checkFunc, func) }
  1836. }
  1837. //document.addEventListener("focus", () => eleget0('button.viewer-button.viewer-button--max')?.click()), eleget0('button.viewer-button.viewer-button--max')?.click()
  1838. },
  1839. //func: () => eleget0('button.viewer-button.viewer-button--max')?.click(),
  1840. }, { //
  1841. url: '//comic.mag-garden.co.jp/',
  1842. author: '//div/div[@class="inner"]/h3'
  1843. }, { //
  1844. url: '//www.mangabox.me/reader/',
  1845. author: '//div/p[@class="episodes_author"]',
  1846. lastEpisode: '//SPAN[@class="episodes_strong_text is_new"]/../..',
  1847. firstEpisode: '//li[last()]/a/div/div[@class="episodes_item_detail"]/span'
  1848. }, { //
  1849. url: '//cycomi.com/fw/cycomibrowser/chapter/',
  1850. firstEpisode: '//a[1]/div/p[@class="chapter-title"]',
  1851. lastEpisode: '//a[last()]/div/p[@class="chapter-title"]',
  1852. author: '//p[@class="title-author"]',
  1853. pankuzuUp: '//a[text()="作品TOP"]',
  1854. }, { //
  1855. url: '//mangahack.com/comics/',
  1856. sibling: '.comic_img img,.webtoon_img img',
  1857. header: 'header',
  1858. nextEpisode: 'div.pageNavi:nth-child(6) > ul > li.right > a',
  1859. author: '//div[@class="nameArea cf"]/div[@class="official"]/a|//div/div[@class="comicTitle cf"]/ul/li/span[@class="c_name"]/a|//div[@class="cf"]/p/a',
  1860. firstEpisode: '//a[text()="はじめから読む"]',
  1861. lastEpisode: '//li[last()]/a[text()="最新話を読む"]',
  1862. prevEpisode: 'div.pageNavi.cf:nth-child(3) > ul > li.left > a',
  1863. pankuzuUp: '//div[1]/ul[@class="cf"]/li/span[1]/a',
  1864. fitFunc: () => { fitFuncA('header#linktop.page-header', '.comic_img img,.webtoon_img img', 400, null, "div#readHeader,div.cookie-agreement"); },
  1865. }, { //
  1866. url: '//manga-park.com/title/',
  1867. author: '//p[@class="author txtColorSubject"]',
  1868. firstEpisode: () => !eleget0('div.manga-face.active') && elegeta('div.chapter ul li:has(.free-badge svg) p:visible')?.[0],
  1869. lastEpisode: () => !eleget0('div.manga-face.active') && elegeta('div.chapter ul li:has(.free-badge svg) p:visible')?.pop(),
  1870. /*firstEpisode: () => !eleget0('div.manga-face.active') && eleget0('//div[@class="row title"]/div[@class="chapter"]/ul/li[1]/div[1]/div/div/span[@class="txtColorSubjectSP" and text()="1"]'),
  1871. lastEpisode: () => !eleget0('div.manga-face.active') && elegeta('#mangadetail_badge-free')?.pop()?.closest("li"), //'//div[@class="row title"]/div[@class="chapter"]/ul/li[last()]/div[1]/div/div/span',
  1872. */
  1873. leftKey: '//div[@class="btn read-next-chapter"]', //'//div[@class="right"]/div[@class="btn read-next-chapter"]',
  1874. pankuzuUp: '//div[contains(@class,"btn close-viewer")]:visible',
  1875. }, { //
  1876. url: '//www.alphapolis.co.jp/manga/',
  1877. author: '//div/div[@class="author"]/span/a[1]|//div[@class="mangaka"]/a|//div[@class="author-label"]/div[2]/a',
  1878. firstEpisode: '//div[@class="first-time-free"]/a[contains(text(),"第1回を無料で読む")]|//section/div[@class="manga-detail-toc section"]/div[@class="toc"]/div[contains(@class,"episode-list")]/a[last()]/div[2]/div[1]|//a[text()="第1回を読む"]',
  1879. prevEpisode: '//a[@class="prev-link "]',
  1880. pankuzuUp: '//div[@class="banner"]/a[@target="_top"]/img',
  1881. lastEpisode: '//div[@class="episode-list"]/a[1]/div/div[1]/../..|//div[1]/a[last()]/object[1]/a/span[text()="この話を読む"]',
  1882. leftKey: '//a[@class="next-link "]',
  1883. }, { //
  1884. url: '//web-ace.jp/',
  1885. sibling: '//div[@class="box inner viewerImageBox"]/a/img[1]/../../..',
  1886. nextEpisode: '//section/div/div/a[text()="次の話へ"]',
  1887. prevEpisode: '//a[text()="前の話へ"]',
  1888. firstEpisode: '//a[contains(text(),"最初から読む")]',
  1889. lastEpisode: '//ul/li[1]/a/div/div[@class="media-body"]/p[@class="text-bold"]|//ul/li[1]/a[@class="navigate-right"]/ul/li/div[@class="media-body"]/p',
  1890. pankuzuUp: '//a[text()="作品TOPへ"]',
  1891. author: '//span[@class="WorkSummary-headerinfo"]|//p[@class="author"]/span',
  1892. atamadashiDelay: 900,
  1893. fitFunc: () => { fitFuncA('', '//div[@class="box inner viewerImageBox"]/a/img', 400); },
  1894. }, { //
  1895. url: '//comic.webnewtype.com/contents/',
  1896. sibling: '//div[@id="viewerContainer"]/div/div[@class="box inner viewerImageBox"]/a/img[1]/../../..',
  1897. nextEpisode: '//a/img[@alt="次の話"]/..|//li[@class="detail__next-btn"]/a[text()="次の話 >"]',
  1898. prevEpisode: '//header[@class="ViewerHeader"]/nav/a/img[@alt="前の話へ"]/..|//li[contains(@class,"detail__prev-btn")]/a',
  1899. author: '//span[@class="WorkSummary-headerinfo"]|//div[@class="contents__info"]',
  1900. firstEpisode: '//a[contains(text(),"最初から読む")]|//ul[@id="episodeList"]/li[last()]/a/div/div[last()]/p|//li/a[@class="detail__model--first-btn"]',
  1901. lastEpisode: '//section/ul/li[1]/a/div/h3[@class="ListCard-title"]/../..|//li[1]/a/div[2]/div[2]/p[@class="number"]|//div/ul[@class="contents__list--comic" and @id="episodeListDsc"]/li[1]/a/ul/li/div/div[@class="detail__txt--date"]',
  1902. pankuzuUp: '//h1[@class="ViewerHeader-title"]/a|//a[@class="detail__model--more-btn" and contains(text(),"話一覧に戻る")]',
  1903. atamadashiDelay: 900,
  1904. scrollSpeed: 2,
  1905. header: '.nav-list',
  1906. fitFunc: () => { fitFuncA('#header,.nav-list:visible', '#viewerContainer img', 100, (e, mh) => { e.style.height = mh }), 0 }, // 画面縦にフィット*/
  1907. }, { //
  1908. url: '//www.ebigcomic4.jp/title/',
  1909. lastEpisode: '//span[@class="episodeName"]',
  1910. }, { //
  1911. url: '.5ch.net/',
  1912. sibling: '.post:not(.ch5pu .post),div#boardname', //'//dl[@class="thread"]/dt|//span[@class="number"]/../..',
  1913. //sibling: '.post', //'//dl[@class="thread"]/dt|//span[@class="number"]/../..',
  1914. header: '.navbar-fixed-top>.container,div.row.noflex.maxwidth100.white.padding0p5.maxheight2p5.borderbottomlightgrey',
  1915. pankuzuUp: '//a[contains(text(),"■掲示板に戻る■")]|//div[@id="boardname"]/a[last()]|//html/body/div/div[contains(@class,"row noflex maxwidth100")]/div[@id="threadcontent"]/div[@id="boardname"]/div/a[2]',
  1916. disableSnapWhenPageIsClicked: 1,
  1917. }, { //
  1918. url: '.shitaraba.net/bbs/read.cgi/|.shitaraba.net/bbs/read_archive.cgi/',
  1919. sibling: '.post',
  1920. header: '.site-header',
  1921. pankuzuUp: '//a[contains(text(),"■掲示板に戻る■")]',
  1922. disableSnapWhenPageIsClicked: 1,
  1923. }, { //
  1924. url: '//www.ganganonline.com/',
  1925. firstEpisode: '//a[last()]/div[2]/p[contains(@class,"Chapter_chapter__mainText__")]',
  1926. lastEpisode: '//a[2]/div[contains(@class,"Chapter_chapter__body__")]/p[1]',
  1927. author: '//div[contains(@class,"title_detail_")]/h1',
  1928. delay: 1000,
  1929. leftKey: '//button[contains(@class,"viewer_viewer__nextChapterButton__") and contains(text(),"次の話へ")]',
  1930. }, { //
  1931. url: '//watamote.com/',
  1932. sibling: '//span[@class="res"]/..',
  1933. disableSnapWhenPageIsClicked: 1,
  1934. }, { //
  1935. url: '//news.mynavi.jp/series/|//news.mynavi.jp/article/',
  1936. sibling: 'img.photo_table__img',
  1937. author: '//a[@class="article-author__name"]|//div[@class="article-author"]/a|//h3[contains(@class,"articleAuthor_nameHead")]',
  1938. nextEpisode: () => eleget0('ul.articleSeries_indexList.gtm li.is-current')?.previousElementSibling?.querySelector('a') || null,
  1939. prevEpisode: () => eleget0('ul.articleSeries_indexList.gtm li.is-current')?.nextElementSibling?.querySelector('a') || null,
  1940. firstEpisode: '//div/section[last()]/div[@class="tile3__link js-link"]/div[@class="tile3__thumb"]/div/img[@class="tile3__img"]|//div/main[@class="main"]/section/table[@class="table"]/tbody/tr[last()]/td/a[@class="table__link"]|.//ul[@class="summaryList_list gtm"]/li[last()]/a/div[@class="summaryList_listNode_info"]/h3',
  1941. lastEpisode: '//section[1]/div/div/div[@class="tile3__img-wrap"]/img|//main[@class="main"]/section[@class="box"]/table[@class="table"]/tbody/tr[1]/td[@class="table__td"]/a|.//li[1]/a[@class="summaryList_listNode_link"]/div[@class="summaryList_listNode_info"]/h3',
  1942. pankuzuUp: '//p[@class="article-header__series"]/a',
  1943. header: `header`,
  1944. fitFunc: () => { fitFuncA('header', "picture , picture > img", 400); },
  1945. }, { //
  1946. url: '//matogrosso.jp/',
  1947. sibling: '.entry-body img',
  1948. nextEpisode: '//div/a[@rel="next"]',
  1949. prevEpisode: '//div/a[@rel="prev"]',
  1950. author: '//h3[@class="widget-header"]/a|//div[@class="widget-authordescription"]/div/p[1]/span[1]',
  1951. firstEpisode: '//div[@class="asset-content"]/div[@class="asset-body"]/dl/dd[last()]/a',
  1952. lastEpisode: '//div[@class="asset-body"]/dl/dd[1]/a',
  1953. pankuzuUp: '//h3[@class="widget-header"]/a[1]',
  1954. fitFunc: () => { fitFuncA('', ".entry-body img", 400); },
  1955. }, { //
  1956. url: '//sukupara.jp/',
  1957. sibling: '//div[@class="magarea"]/img/..',
  1958. author: '//div[@id="artist"]/dl/dt',
  1959. firstEpisode: '//a/img[@alt="第1回はコチラから"]',
  1960. lastEpisode: '//p[@class="newest-story-tit"]/a',
  1961. pankuzuUp: '//ul[@class="menulist clearfix"]/li[last()-1]/a',
  1962. fitFunc: () => { fitFuncA("", '//div[@class="magarea"]/img') },
  1963. }, { //
  1964. url: '//cho-animedia.jp/comic_category/|//cho-animedia.jp/comic/',
  1965. sibling: '//div[@class="contents"]/p/img', //'//section[@class="contents_area"]/div[@class="contents"]', //
  1966. header: '//html/body/header[@class="fixed"]',
  1967. nextEpisode: '//dl[last()]/dt/a/img[@class="attachment-full size-full wp-post-image"]/..',
  1968. prevEpisode: '//dl[1]/dt/a/img[@class="attachment-full size-full wp-post-image"]/..',
  1969. firstEpisode: '//li[last()]/a/div[@class="photo"]/img/../..',
  1970. lastEpisode: '//li[1]/a/div[@class="photo"]/img/../..',
  1971. pankuzuUp: '//div[@class="breadcrumbs"]/ul/li[last()-1]/a',
  1972. }, { //
  1973. url: '//leedcafe.com/',
  1974. author: '//div[@class="creator-header clearfix"]/h2/a',
  1975. lastEpisode: '//div[1]/div/div/div/p/a[@class="btn btn-default"]',
  1976. firstEpisode: '//div[last()]/div/div[@class="inner"]/div/p/a[@class="btn btn-default" and text()="この話を読む"]',
  1977. }, { //
  1978. url: '//storia.takeshobo.co.jp/manga/',
  1979. author: '//div[@class="name_intro_author"]',
  1980. firstEpisode: '//div[last()]/div[@class="box_episode_text"]/a[@class="btn"]',
  1981. lastEpisode: '//div[last()]/div[1]/div[@class="box_episode_text"]/a[1]',
  1982. pankuzuUp: '//a[text()="作品ページへ"]',
  1983. }, { //
  1984. url: '//www.tatan.jp/',
  1985. sibling: '//div[@id="viewer_content"]/img',
  1986. nextEpisode: '//a/img[@class="btn_next"]',
  1987. prevEpisode: '//a/img[@class="btn_prev"]',
  1988. author: '//p[@class="author"]',
  1989. firstEpisode: '//ul[@id="sakuhin_backnumber_ul"]/li/a[text()="1"]',
  1990. lastEpisode: '//a/img[@alt="最新話を読む"]/..',
  1991. pankuzuUp: '//a/img[@class="btn_sakuhin"]/..',
  1992. }, { //
  1993. url: '//cakes.mu/',
  1994. sibling: '//img[@class="dropshadow"]/..|.//div[5]/p/img/..|//div[4]/div[@class="article-content"]/h1', //|//div[@class="article-content"]/h1',
  1995. header: '//header[@class="postHeader"]',
  1996. nextEpisode: '//li[@class="navi-items next"]/a[@data-ga="post:header:next"]',
  1997. prevEpisode: '//li[@class="navi-items prev"]/a[@data-ga="post:header:previous"]',
  1998. author: '//div/p[@class="post-author"]/span|//div[@data-cakes-amazon=""]/div[@id="container_right"]/div/h3/a',
  1999. firstEpisode: '//li[last()]/h3[@class="post-title-full"]/a',
  2000. lastEpisode: '//li[1]/h3[@class="post-title-full"]/a',
  2001. pankuzuUp: '//h2[@class="post-title"]/a',
  2002. }, { //
  2003. url: '//kawaii2ch.com/',
  2004. sibling: '//div[contains(@class,"t_h")]/div/..|//a[@class="related-entry-title-link"]/../../../..',
  2005. disableSnapWhenPageIsClicked: 1,
  2006. }, { //
  2007. url: '//comicpash.jp/',
  2008. sibling: '//main[@class="manga row"]/img',
  2009. author: '//p[@class="mangaMainTitle__name"]',
  2010. firstEpisode: '//a[contains(text(),"第1話を読む")]',
  2011. lastEpisode: '//a/em[contains(text(),"最新話")]/..',
  2012. pankuzuUp: '//section[@typeof="BreadcrumbList"]/div[@class="row"]/span[2]/a/span/..',
  2013. }, { //
  2014. url: '//www.nicovideo.jp/search/',
  2015. sibling: '//li[@class="item nrn-thumb-info-done"]',
  2016. header: '//div[@id="siteHeader"]',
  2017. disableSnapWhenPageIsClicked: 1,
  2018. }, { //
  2019. url: '//www.jstage.jst.go.jp/',
  2020. sibling: '//ul[@class="search-resultslisting"]/li',
  2021. header: '//body/span[@class="noprint"]/header/nav',
  2022. disableSnapWhenPageIsClicked: 1,
  2023. }, { //
  2024. url: '//ci.nii.ac.jp/',
  2025. sibling: '//div[@class="listitem xfolkentry"]/..',
  2026. header: '//div[@id="nav-content"]',
  2027. disableSnapWhenPageIsClicked: 1,
  2028. }, { //
  2029. url: '//comic.pixiv.net/viewer/|//comic.pixiv.net/works/',
  2030. pankuzuUp: '//div[@class="series-summary"]/div/a|//div[contains(@class,"NavBar_close__")]/img|//div[@style="grid-area: main;"]/div[1]/div/div[@class="max-w-screen-screen4 grid gap-[20px] mx-auto"]/div[1]/img',
  2031. prevEpisode: '//li[@class="prev-story story-navigation"]/a',
  2032. nextEpisode: '//li[@class="next-story story-navigation"]/a',
  2033. leftKey: '//a[@class="gtm-after-reading-section-next"]/div/div[last()]/span|//a[@class="gtm-next"]:visible',
  2034. delay: 500,
  2035. author: '//div[@class="works-author"]|//div/div[contains(@class,"Header_author__")]/span|//body/div/div/div/div[last()]/div/div[@class="Header_largeInner__ie-pc"]/div/div/span|//div[last()]/div/div[3]/div[@class="flex-grow"]/div/span[@class="text-sm text-text2-default"]|//div[last()]/div/div[3]/div[@class="flex-grow"]/div/span[@class="text-sm text-text2"]|//div[last()]/div/div[3]/div[@class="flex-grow"]/div[1]|//html/body/div[@id="__next"]/div[2]/div/div/div[1]/div/div[@class="flex-grow"]/div[1]',
  2036. firstEpisode: '//a[text()="最初から読む"]|//span[@class="font-bold text-center" and contains(text(),"最初から読む")]|//div[@class="w-full"]/div[last()]/a[last()]|//div[text()="最初から読む"]',
  2037. lastEpisode: '//div[1]/a/div/div[last()]/div[1]|//div[2]/div/div[last()]/div/a[1]/div/div/div[1]|//div[@role="listitem"]/div[last()]/div[1]',
  2038. pankuzuUp: '//div/div[contains(@class,"mt-4 text-white typography-12") and text()="作品詳細"]',
  2039. leftKey: '//a[@class="gtm-after-reading-section-next"]/div/div[last()]/span|//a[@class="gtm-next"]:visible',
  2040. }, { //
  2041. url: '//comic-fuz.com/',
  2042. //firstEpisode: '//div[last()]/ul/a[last()]/div/h3',
  2043. //lastEpisode: () => elegeta('a.Chapter_chapter__wJPBe.false:has(i.Chapter_chapter__label_update__c_DpY):not(:has(img.Chapter_chapter__price_gold__tbDjd)) h3.Chapter_chapter__name__T0AQq')?.shift(), //'//li[last()]/a[@class="link-over"]',
  2044. lastEpisode: () => elegeta('a.Chapter_chapter__wJPBe.false:has(p.Chapter_chapter__price_free__oKpKM) h3.Chapter_chapter__name__T0AQq')?.shift(), //'//li[last()]/a[@class="link-over"]',
  2045. disableSnapWhenPageIsClicked: 1,
  2046. leftKey: 'a.ChapterLastPage_nextChapter__button__x1P_o',
  2047. author: '//a/p[contains(@class,"AuthorTag_author__name__")]/..', //'//div/div[contains(@class,"author")]/div/p/a',
  2048. pankuzuUp: '//button[@title="閲覧をやめる"]',
  2049. func1st: () => oaco('//div/div/div/div/div/div/button[contains(@class,"false")]/img[@src="/assets/viewer/expand.svg" and @width="16"]'),
  2050. }, { //
  2051. url: '//comicawa.com/TitleDetail/',
  2052. firstEpisode: '//div[@role="button" and text()="はじめから読む"]',
  2053. lastEpisode: '//div[@role="button" and text()="最新話を読む"]',
  2054. }, {
  2055. url: '//manga.line.me/',
  2056. firstEpisode: '//li[1]/a[@data-action="read" and @data-is_rich=""]/span/..|//a[@class="MdBtn03Read01" and contains(text(),"最初から読む")]|//div[last()]/div[@class="mdIND13Txt"]/a/h3',
  2057. lastEpisode: '//li[3]/a[@data-action="read" and @data-is_rich=""]/span/..|//div[@class="fnAutoPagingContainer"]/div[1]/div/a/h3',
  2058. nextEpisode: '//a[@class="fnButtonNextChapter"]',
  2059. author: '//dd[@class="mdMNG04Dd01"]/a',
  2060. }, { //
  2061. url: '//to-ti.in/',
  2062. disableSnapWhenPageIsClicked: 1,
  2063. firstEpisode: '//div[@class="page_pager"]/p[@class="prev"]/a/span',
  2064. lastEpisode: '//div[@class="page_pager"]/p[@class="next"]/a/span',
  2065. author: '//div[@class="profile"]/div/div/p[@class="name"]',
  2066. nextEpisode: 'a.next.typesquare_option',
  2067. prevEpisode: 'a.prev.typesquare_option',
  2068. pankuzuUp: '//div[@class="content"]/h2/a',
  2069. keyFunc: {
  2070. key: "ArrowLeft",
  2071. func: () => {
  2072. if (eleget0('//h4[contains(text(),"その他の作品")]:inscreen')) moveClick('a.next.typesquare_option')
  2073. },
  2074. },
  2075. //leftKey:()=>{if(eleget0('//div[@class="other_items_list_news"]:inscreen')){moveClick('//a[@class="next" and text()="次のエピソード"]')}},
  2076. }, { //
  2077. url: '//yomitai.jp/',
  2078. sibling: '//li[@class=""]/figure/img/../..',
  2079. nextEpisode: '//li[@id="article-nav-next"]/a',
  2080. prevEpisode: '//li[@class="series-prev"]/a',
  2081. disableSnapWhenPageIsClicked: 1,
  2082. author: '//figcaption[@class="author-name"]',
  2083. firstEpisode: '//ul[@class="list"]/li[last()]/div/h3/a',
  2084. lastEpisode: '//ul[@class="list"]/li[1]/div/h3/a',
  2085. pankuzuUp: '//a/figure/figcaption[text()="連載の一覧はこちら"]',
  2086. }, { //
  2087. url: '//comic-trail.jp/',
  2088. disableSnapWhenPageIsClicked: 1,
  2089. author: '//div[@class="series-detail"]/h2',
  2090. firstEpisode: '//a[contains(text(),"1話を読む")]',
  2091. lastEpisode: '//a[contains(text(),"最新話を読む")]',
  2092. pankuzuUp: '//a[contains(text(),"作品ページに戻る")]',
  2093. }, { // note
  2094. url: '//note.mu/',
  2095. sibling: '//a[@rel="noopener noreferrer" and @class="o-noteContentImage__itemLink a-link"]/img/../..',
  2096. header: '//div[@id="__layout"]/div/header',
  2097. nextEpisode: '//a[@class="o-sliblingNote__link o-sliblingNote__link--next a-link"]/div',
  2098. prevEpisode: '//a[@class="o-sliblingNote__link o-sliblingNote__link--prev a-link"]/div',
  2099. disableSnapWhenPageIsClicked: 1,
  2100. author: '//div[@class="o-noteContentHeader__name"]/a',
  2101. }, { // コミックアース・スター
  2102. url: '//www.comic-earthstar.jp/',
  2103. disableSnapWhenPageIsClicked: 1,
  2104. author: '//section[@id="comic_info"]/span[@class="title_span"]',
  2105. firstEpisode: '//li[last()]/span/a[@class="on_m readbtn2"]',
  2106. lastEpisode: '//td/a[@class="new_read_btn"]',
  2107. }, { //
  2108. url: 'https://comic-walker.com/detail/KC',
  2109. disableSnapWhenPageIsClicked: 1,
  2110. lastEpisode: () => elegeta('div[class*="EpisodeThumbnail_titleWrapper__"] > div:nth-child(1 of div) > span')?.pop() || elegeta('//ul[contains(@class,"WebSerializationList_episodeList__")]/li/a/div[2]/div[contains(@class,"EpisodeThumbnail_titleWrapper__")]/div[1]')?.pop(),
  2111. leftKey: () => elegeta('//*[contains(@class,"NextEpisodeInPlace_buttonContents__")]/span|//div[contains(@class,"FutureEpisodeInPlaceDialog_dialogBody__")]/a[contains(text(),"次の話を読む")]|//div[contains(@class,"EndOfBookTemplateVStack_inner__Zor3m")]/a/span:text*=を読む')?.pop(),
  2112. author: '//div[contains(@class,"AuthorList_creditsList__")]/a',
  2113. func: () => { addstyle.add(`[class*="ViewerSection_viewer__"] { --viewer-main-max: calc(100vh ) !important;}`) },
  2114. func1st: () => {
  2115. eleget0('button.TertiaryButton_tertiaryButton__WfaYM[data-state="closed"]:text*=話を表示')?.click() //setInterval(()=>eleget0('button.TertiaryButton_tertiaryButton__WfaYM[data-state="closed"]:text*=話を表示')?.click(),1000)
  2116. //oaco('//div/div/button[@type="button" and text()="拡大"]') // 拡大
  2117. //oaco('//button[contains(@class,"WebSerializationList_accordion__") and @type="button" and @aria-expanded="false"]/span[last()]')
  2118. },
  2119. }, { //
  2120. url: '//webcomicgamma.takeshobo.co.jp/',
  2121. disableSnapWhenPageIsClicked: 1,
  2122. author: '//div[@class="name_intro_author"]',
  2123. firstEpisode: '//a[contains(@id,"read_") and contains(@id,"_01") and @class="btn" and contains(text(),"読む")]|//div[last()]/div[contains(@class,"box_episode_text")]/a[1]',
  2124. lastEpisode: '//a[contains(text(),"最新エピソードを読む")]|//div[1]/div[@class="box_episode_text"]/a[text()="このエピソードを読む"]',
  2125. }, { //
  2126. url: '//online.ichijinsha.co.jp/',
  2127. disableSnapWhenPageIsClicked: 1,
  2128. firstEpisode: '//li[last()]/ul/li/a[@class="pc"]',
  2129. lastEpisode: '//div[contains(@class,"read")]/a[@class="pc corner"]',
  2130. }, { //
  2131. url: '//comic-meteor.jp/',
  2132. author: '//div[@class="work_author_intro_name"]',
  2133. firstEpisode: '//div[last()]/div/div[2]/a[text()="読む"]|//a[text()="第1話を読む"]',
  2134. lastEpisode: '//a[text()="最新話を読む"]|//div[@class="latest_info_link_btn01"]/a',
  2135. pankuzuUp: '//div[@class="topics d-none d-sm-block"]/ul/li[last()-1]/a|//div[@class="leaflet-inner"]/a[@alt="作品ページに戻る"]',
  2136. }, { //
  2137. url: '//yasudadou.futene.net/',
  2138. sibling: '//tr',
  2139. nextEpisode: '//a/img[@src="http://yasudadou.futene.net/kyoutuu4_next.png"]/..',
  2140. prevEpisode: '//a/img[@src="http://yasudadou.futene.net/kyoutuu2_back.png"]/..',
  2141. disableSnapWhenPageIsClicked: 1,
  2142. }, { //
  2143. url: '//curazy.com/',
  2144. sibling: '//div/div/p/img/..',
  2145. header: '//body/div[@id="page"]/header/div',
  2146. nextEpisode: '//span[contains(text(),"次ページ:")]|//span[@class="curazy-link-btn__paging"]/i[@class="fa fa-arrow-circle-right"]',
  2147. disableSnapWhenPageIsClicked: 1,
  2148. }, { //
  2149. url: '.yucl.net/',
  2150. sibling: '//div[@class="clearfix"]/p/a/img/../..|//div[last()]/div[1]/figure/img/..',
  2151. nextEpisode: '//div[@class="next-arrow"]/..',
  2152. prevEpisode: '//div[@class="prev-arrow"]/..',
  2153. lastEpisode: '//div[@class="clearfix"]/ul/li[1]/a|//li[1]/div/div[last()]/a',
  2154. }, { //
  2155. url: '//yusb.net/',
  2156. sibling: '//p/img/..',
  2157. nextEpisode: '//div[@class="next-arrow"]/..',
  2158. prevEpisode: '//div[@class="prev-arrow"]/..',
  2159. }, { //
  2160. url: '//grapee.jp/',
  2161. sibling: '//div[@class="image"]/img/..',
  2162. disableSnapWhenPageIsClicked: 1,
  2163. pankuzuUp: '//ul[@typeof="BreadcrumbList"]/li[last()-1]/*',
  2164. }, { //
  2165. url: '//arklightbooks.com/comics/',
  2166. firstEpisode: '//dl[1]/dd/p[@class="arrow jp_bold"]/a',
  2167. lastEpisode: '//dl[last()]/dd/p[@class="arrow jp_bold"]/a',
  2168. }, // @match *://comic-boost.com/*
  2169. {
  2170. url: '//comic-boost.com/',
  2171. firstEpisode: '//div/div/div/a[@class="btn-read"]/span[contains(text(),"最初から読む")]/..',
  2172. lastEpisode: '//span[contains(text(),"最新話を読む")]',
  2173. author: '//div/div[1]/div[2]/ul[@class="author-list"]/li/a',
  2174. },
  2175. /*{
  2176. url: '//comic-boost.com/',
  2177. firstEpisode: '//ul/li[last()]/div/ul/li/a[@class="button button_ico_cart" and contains(text(),"読む")]',
  2178. lastEpisode: '//a[@class="button button_ico_cart" and contains(text(),"読む")]',
  2179. author: '//div[@class="detail"]/p/a[@class="author_name"]',
  2180. },*/
  2181. {
  2182. url: '//futabanet.jp/',
  2183. firstEpisode: '//div[last()]/a[@rel="noopener"]/span',
  2184. lastEpisode: '//div[1]/a[@rel="noopener"]/span[2]',
  2185. author: '//div[@class="detail-ex__writer"]',
  2186. disableSnapWhenPageIsClicked: 1,
  2187. }, {
  2188. url: '//hobbyjapan.co.jp/',
  2189. firstEpisode: '//ul[last()]/li[3]/a[@class="btn_readcomic"]',
  2190. lastEpisode: '//div[@class="page_container series_detail"]/div/div[2]/ul[1]/li[3]/a',
  2191. author: '//ul[@class="book_intro_list"]/li/a'
  2192. }, {
  2193. url: '//www.comic-valkyrie.com/',
  2194. firstEpisode: '//div[@class="box_wrap"]/div[last()]/div[@class="right"]/a[@class="read_bt" and text()="読む"]',
  2195. lastEpisode: '//div[@id="new_story"]/div/a',
  2196. author: '//div[@id="writer"]/p'
  2197. }, {
  2198. url: '//webcomic.ohtabooks.com/',
  2199. firstEpisode: '//li[last()]/a[@class="btn icon arrow"]',
  2200. lastEpisode: '//div[4]/ul/li[@class="wide"]/a',
  2201. author: '//div/div[@class="author"]/span[@itemprop="name"]'
  2202. }, { //
  2203. url: '',
  2204. sibling: '',
  2205. header: '',
  2206. nextEpisode: '',
  2207. prevEpisode: '',
  2208. disableSnapWhenPageIsClicked: 0,
  2209. author: '',
  2210. firstEpisode: '',
  2211. lastEpisode: '',
  2212. pankuzuUp: '',
  2213. }, { //
  2214. url: '',
  2215. sibling: '',
  2216. header: '',
  2217. nextEpisode: '',
  2218. prevEpisode: '',
  2219. disableSnapWhenPageIsClicked: 0,
  2220. author: '',
  2221. firstEpisode: '',
  2222. lastEpisode: '',
  2223. pankuzuUp: '',
  2224. },
  2225. /* { // サイト情報の書き方 以下、XPathはCSSセレクタでも可 doc::
  2226. url: '', // 記述したいサイトのurlにマッチする正規表現
  2227. sibling: '', // ←→キーでスクロールしたいページ要素を指すXPath
  2228. header: '', // ページ上部のピン留めされたヘッダ(スクロールにくっついてくる帯みたいなの)の要素を指すXPath
  2229. nextEpisode: '', // Enterキーでクリックする次の話へのリンクを指すXPath
  2230. prevEpisode: '', // ]キーでクリックする1つ前の話へのリンクを指すXPath
  2231. atamadashi: '', // 頭出し機能true時に特定の要素にスクロールさせたい時のXPath
  2232. disableSnapWhenPageIsClicked: 0, // 1にするとページ要素クリックでめくる機能を無効
  2233. author: '', // 漫画の作者名が書かれている要素を指すXPath
  2234. firstEpisode: '', // 第1話を指すXPath
  2235. lastEpisode: '', // 最新話を指すXPath
  2236. pankuzuUp: '', // Shift+↑でクリックする要素(パンくずリストの1つ上)を指すXPath
  2237. leftKey:'', // XPath 画面内にこの要素が入っていたら左キーでそれをクリック 最後のページまで行かないと次話ボタンが出ないサイトなどで使用
  2238. rightKey:'', // XPath 画面内にこの要素が入っていたら右キーでそれをクリック 最後のページまで行かないと次話ボタンが出ないサイトなどで使用
  2239. keyNextSibling:'', // 右キーの代わりに使うキー 元々右キーが使われているサイト、ツイコミ等で使用
  2240. keyPrevSibling:'', // 左キーの代わりに使うキー 元々左キーが使われているサイト、ツイコミ等で使用
  2241. allowedGap: null, // 数値px これがあるとページ画像が画面上端ちょうどの位置にあると見なす範囲を直接指定、ツイコミ等で使用 なければ自動
  2242. scrollSpeed: 1.5, // 数値 これがあるとスクロール速度(通常はShifT+Sで設定)値をこれで上書きする ヘッダが動的に出入りしてスクロール位置やfitFuncAに不都合なサイト、newtype等で使用
  2243. insteadofClickFunc: null, // 1だと次ページへなどのボタンにclickではなくこの関数を実行 ヤンマガなどSPAで頭出しが効かないサイトで使用
  2244. fitFunc: null, // 関数、これがあるとaキーで画像フィット機能をオンオフする 一番単純なものでは関数内でfitFuncA(<ヘッダのcss>, <ページ画像のcss>, <遅延ms>)を実行すれば良い。このときのページ画像は:inscreenをつけないと全画面化した時に縦スクロール位置がズレるのでつけたほうがいいが、それが有効になるにはページ画像ごとの縦間隔がmarginu超でないといけない
  2245. keyFunc: {}, // キーボードのキーで始まる機能を追加する {key:"z",func:(key)=>{alert(key)}}のように書くとzキーを押すとfunc内が実行される
  2246. func1st: null, // 関数、これがあると最初に実行される "abort"をreturnすると動作を停止する
  2247. },
  2248. */
  2249. ]
  2250.  
  2251. let addstyle = {
  2252. added: [],
  2253. add: function(str) {
  2254. if (this.added.includes(str)) return
  2255. GM.addStyle(str)
  2256. this.added.push(str)
  2257. },
  2258. }
  2259.  
  2260. // match文を生成
  2261. if (LogMatch) {
  2262. let matchlist = ""
  2263. for (let s of SITEINFO.slice().sort(function(a, b) { return a.url > b.url ? 1 : -1 })) {
  2264. if (s.url != "")
  2265. for (let s2 of s.url.split("|")) {
  2266. matchlist += "// @match *:" + s2.replace(/\.\*/gm, "*").replace(/^\./, "//*.") + "*\n";
  2267. }
  2268. }
  2269. alert(matchlist);
  2270. }
  2271.  
  2272. var customsib = pref("wcs_siblingXPath") || "";
  2273. if (customsib) {
  2274. SITEINFO.length = 0;
  2275. SITEINFO.push({ "url": getDomain(), "sibling": customsib, "disableSnapWhenPageIsClicked": 1, "header": "auto", "sortSibling": 1 })
  2276. }
  2277.  
  2278. document.addEventListener('keydown', function f(e) {
  2279. if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.isContentEditable || ((e.target.closest('#chat-messages,ytd-comments-header-renderer') || document.activeElement.closest('#chat-messages,ytd-comments-header-renderer')))) return;
  2280. var key = (e.shiftKey ? "Shift+" : "") + (e.altKey ? "Alt+" : "") + (e.ctrlKey ? "Ctrl+" : "") + e.key;
  2281. if (!e.getModifierState("Alt") && !e.getModifierState("Control") && e.getModifierState("Shift") && (e.key == "\`")) { // shift+@::
  2282. // e.preventDefault();
  2283.  
  2284. let ele = document.elementFromPoint(mousex, mousey)
  2285. let csssel = (ele && ele != document.body) ?
  2286. `${ele.tagName?.toLowerCase()}${ele.id?"#"+ele.id:""}${ele.className?"."+ele.className.trim().replace(/\s+/g,".").trim():""}` : ""
  2287. // var copipe = customsib ? `現在の設定:\n\n// @match *://${ location.href.match(/^https?:\/{2,}(.*?)(?:\/|\?|#|$)/)[1] }/*\n {\n url: '//${location.href.match(/^https?:\/{2,}(.*?)(?:\/|\?|#|$)/)[1] }/',\n sibling: '${ customsib }',\n header: '${SITE?.header||""}',\n nextEpisode: '',\n prevEpisode: '',\n disableSnapWhenPageIsClicked: 1,\n author: '',\n firstEpisode: '',\n lastEpisode: '',\n pankuzuUp: '',\n },\n\n` : "";
  2288. var copipe = getDomain() == "file" ? "" : customsib ? `現在の設定:\n\n// @match *://${ getDomain() }/*\n {\n url: '//${getDomain() }/',\n sibling: '${ customsib }',\n header: '${SITE?.header||""}',\n nextEpisode: '',\n prevEpisode: '',\n disableSnapWhenPageIsClicked: 1,\n author: '',\n firstEpisode: '',\n lastEpisode: '',\n pankuzuUp: '',\n },\n\n` : "";
  2289. var sib = prompt(`${getDomain()}\n今指した要素:\n${csssel}\n(${elegeta(csssel).length}個存在)\n\n` + copipe + "Enter Sibling XPath/CSS\n空欄にすると設定を削除します", (/^[^\/]+/.test(customsib) && csssel) ? `${customsib} , ${csssel}` : customsib || csssel);
  2290. if (sib === null) return;
  2291. if (!sib || !eleget0test(sib)) {
  2292. pref("wcs_siblingXPath", null);
  2293. alert("空欄、またはXPathとして1つ以上ヒットしないので、設定を削除します");
  2294. } else {
  2295. pref("wcs_siblingXPath", sib);
  2296. }
  2297. location.reload();
  2298. return;
  2299. }
  2300. }, false);
  2301. /* $('a[target="_blank"]').removeAttr("target");
  2302. setTimeout(() => $('a[target="_blank"]').removeAttr("target"), 500);
  2303. setTimeout(() => $('a[target="_blank"]').removeAttr("target"), 1500);*/
  2304.  
  2305. var SITE;
  2306.  
  2307. let wcsinfo = eleget0('#wcsSITEINFO'); // fileで埋め込んだSITEINFOがあればそれを使う
  2308. if (wcsinfo) SITE = { sibling: decodeURIComponent(wcsinfo.dataset?.sibling), header: decodeURIComponent(wcsinfo.dataset?.header), disableSnapWhenPageIsClicked: 1 };
  2309. else SITE = SITEINFO.find(v => (typeof v?.url == "function" ? v?.url() : v?.url && location?.href?.match(v?.url)));
  2310. if (!SITE) {
  2311. if (elegeta('.wcsSibling , .wcsPrevEpisode , .wcsNextEpisode , .wcsFirstEpisode , .wcsLastEpisode , .wcsHeader')) {
  2312. SITE = { sibling: `.wcsSibling`, prevEpisode: `.wcsPrevEpisode`, nextEpisode: `.wcsNextEpisode`, firstEpisode: `.wcsFirstEpisode`, lastEpisode: `.wcsLastEpisode`, header: `.wcsHeader`, disableSnapWhenPageIsClicked: 1 }
  2313. } else return;
  2314. }
  2315. if (SITE.func1st) { if (SITE.func1st() == "abort") return; }
  2316. if (SITE.marginu) marginu = SITE.marginu;
  2317. scrollSpeed = SITE.scrollSpeed ?? scrollSpeed
  2318.  
  2319. if (EXPERIMENTAL_EMBED_FUNCTION_FOR_LOCAL_HTML && SITE?.sibling && location.protocol != "file:") {
  2320. if ([SITE?.sibling, SITE?.header, SITE?.disableSnapWhenPageIsClicked].every(v => typeof v != "function")) {
  2321. let sitag = end(document.body, `<span id="wcsSITEINFO" data-disable-snap-when-page-is-clicked="1"></span>`);
  2322. sitag.dataset.sibling = encodeURIComponent(SITE?.sibling); // 直接タグに入れると約物が生き返る
  2323. sitag.dataset.header = encodeURIComponent(SITE?.header);
  2324. sitag.dataset.disableSnapWhenPageIsClicked = encodeURIComponent(SITE?.disableSnapWhenPageIsClicked);
  2325. }
  2326. }
  2327. // if (EXPERIMENTAL_EMBED_FUNCTION_FOR_LOCAL_HTML && SITE?.sibling && location.protocol != "file:") before(document.body, `<script id="wcsEmbeded">
  2328.  
  2329. //(function() { if (location?.protocol != "file:") return; let pageEle = 'h1,h2,h3'; let header = "#header"; let marginu = 3; let scrollSpeed = 2; let IGNORE_SIBLING_CLOSER_THAN = 11; let GF = {}; let t = Date.now(); document.addEventListener("keydown", function(e) { if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.isContentEditable) return; var key = (e.shiftKey ? "Shift+" : "") + (e.altKey ? "Alt+" : "") + (e.ctrlKey ? "Ctrl+" : "") + e.key; if (["ArrowLeft", "ArrowRight"].includes(key)) { e.preventDefault(); e.stopPropagation(); var nh = getCurrentHeaderBottom(); var page = key == "ArrowLeft" ? elegeta(pageEle).filter(e => e.offsetHeight).sort((a, b) => a?.getBoundingClientRect()?.top > b?.getBoundingClientRect()?.top ? -1 : 1).find(e => e.getBoundingClientRect().top - nh + marginu < -marginu - IGNORE_SIBLING_CLOSER_THAN) : elegeta(pageEle).filter(e => e.offsetHeight).sort((a, b) => a?.getBoundingClientRect()?.top > b?.getBoundingClientRect()?.top ? 1 : -1).find(e => e.getBoundingClientRect().top - nh - marginu > marginu + IGNORE_SIBLING_CLOSER_THAN); page && sscrollInt(page); } }); function sscrollInt(page) { var nh = getCurrentHeaderBottom(); let y = window.pageYOffset; window.scroll(0, (y + Math.max(-333, Math.min(333, (page?.getBoundingClientRect()?.top - nh) / scrollSpeed)))); if ((Math.abs(page?.getBoundingClientRect()?.top - nh) > 1 && y != window.pageYOffset) || GF?.lastHH?.some(v => v != nh)) { clearTimeout(GF?.int); GF.int = setTimeout(() => sscrollInt(page), Math.max(1, 15 - (Date.now() - t))); t = Date.now(); } else { window.scroll({ top: (window.pageYOffset - nh + page?.getBoundingClientRect()?.top), behavior: "instant" }); } GF.lastHH = [...(GF?.lastHH || []), nh].slice(-5); } function getCurrentHeaderBottom() { return (header == "auto" ? getLikeSticky() : elegeta(header)).map(e => e.getBoundingClientRect().bottom).reduce((a, b) => Math.max(a, b), 0) + 0; } function getLikeSticky() { if (Date.now() - (GF.stickyTime || 0) > 1500) { GF.stickyTime = Date.now(); GF.sticky = elegeta('header,div:inscreen:visible').filter(e => { let p = getComputedStyle(e)?.getPropertyValue("position"); if (!["sticky", "fixed"].includes(p)) return false; let r = e?.getBoundingClientRect(); let w = window.innerWidth; return r?.left < w - w / 3 && r?.right > w / 3 && r?.bottom < window.innerHeight / 3; }); } return GF.sticky; } function elegeta(xpath, node = document) { if (!xpath || !node) return []; if (typeof xpath === "function") return xpath(); let xpath2 = xpath.replace(/:inscreenY|:inscreen|:visible|:text\\*=[^:]*/g, ""); let array = []; try { if (!/^\\.?\\/ / .test(xpath)) { array = [...node.querySelectorAll(xpath2)]; } else { var snap = document.evaluate("." + xpath2, node, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); let l = snap.snapshotLength; for (var i = 0; i < l; i++) array[i] = snap.snapshotItem(i); } if (/:visible/.test(xpath)) array = array.filter(e => e.offsetHeight); if (/:inscreen/.test(xpath)) array = array.filter(e => { var eler = e.getBoundingClientRect(); return (eler.bottom >= 0 && eler.right >= 0 && eler.left <= document.documentElement.clientWidth && eler.top <= document.documentElement.clientHeight) }); if (/:text\\*=./.test(xpath)) { let text = xpath.replace(/^.*:text\\*=([^:]*)$/, "$1"); if (text) array = array.filter(e => new RegExp(text).test(e?.textContent)); } } catch (e) { return []; } return array; } function eleget0(xpath, node = document) { if (!xpath || !node) return null; if (typeof xpath === "function") return xpath(); if (/:inscreen|:visible|:text\\*=/.test(xpath)) return elegeta(xpath, node)?.shift(); if (!/^\\.?\\/ / .test(xpath)) return node.querySelector(xpath); try { var ele = document.evaluate("." + xpath, node, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); return ele.snapshotLength > 0 ? ele.snapshotItem(0) : null; } catch (e) { alert(e + "\\n" + xpath + "\\n" + JSON.stringify(node)); return null; } } })();
  2330.  
  2331. //</script>`.replace("h1,h2,h3", SITE?.sibling).replaceAll("#header", SITE?.header || "auto"));
  2332.  
  2333. //setTimeout(() => {
  2334. //$(document).ready(function() {
  2335. //window.addEventListener('load', (event) => {
  2336. //document.addEventListener('DOMContentLoaded', function() {
  2337. if (SITE.fitFunc) {
  2338. if (fit == "true") {
  2339. popup("A:画像フィット(on)");
  2340. SITE.fitFunc(SITE)
  2341. GF.fitfuncBon = 1
  2342. } else { popup("A:画像フィット(off)", "#808080"); }
  2343. }
  2344. //})
  2345. // }, (SITE.fitFuncDelay || ((SITE.delay || 0) + 500))
  2346.  
  2347. setTimeout(() => {
  2348.  
  2349. var j = 0;
  2350. for (let pro in SITE) {
  2351. if (SITE[pro]) {
  2352. //console.log(pro + " : " + SITE[pro])
  2353. var str1 = ["url:", "sibling:", "sibling:", "header:", "nextEpisode:", "prevEpisode:", "disableSnapWhenPageIsClicked:", "author:", "firstEpisode:", "lastEpisode:", "pankuzuUp:", "keyFuncHelpXP:"];
  2354. var str2 = ["", SITE.siblingHelp || "←→:前次ページ", "Shift+A:頭出し", "", "Enter:次の話", "]:前の話", "", "", "→:第1話", "Enter:最新話", "Shift+↑:上階層", SITE.keyFuncHelp];
  2355. for (var k = 0; k < str1.length; k++) {
  2356. if (pro + ":" == str1[k] && str2[k] && eleget0(SITE[pro])) {
  2357. if (PopupHelpMS) {
  2358. let node = document.createElement('span');
  2359. node.className = "ignoreMe";
  2360. node.innerHTML = str2[k]; //+" : "+SITE[pro];
  2361. node.setAttribute("style", "max-width:95%; right:0; bottom:" + (j * 21) + "px; z-index:2147483647; opacity:" + 1 + "; text-align:left; line-height:1.1; position:fixed; font-size:12px; font-weight:bold; margin:2px; text-decoration:none; padding:1px 6px; border-radius:15px; color:#ffffff; " + (ButtonBG)); //" box-shadow:3px 3px 3px #0004;");
  2362. document.body.appendChild(node)
  2363. $(node).hide(0);
  2364. setTimeout(() => { $(node).slideDown('fast'); }, 67 * j); //fadeIn('fast')
  2365. setTimeout(() => { $(node).hide(400).queue(function() { this.remove(); }) }, PopupHelpMS + 67 * j); //fadeOut('fast')
  2366. }
  2367. j++;
  2368. }
  2369. }
  2370. }
  2371. }
  2372. addHelp(SITE.firstEpisode, "→");
  2373. addHelp(SITE.lastEpisode, "Enter");
  2374. addHelp(SITE.prevEpisode, " ] ");
  2375. addHelp(SITE.nextEpisode, "Enter");
  2376. if (SITE.nextEpisode > "") {
  2377. var ele = eleget0(SITE.nextEpisode);
  2378. if (ele && ele.tagName === "A") {
  2379. $("head").append("<link rel='prefetch' href='" + ele.href + "'>").append("<link rel='prerender' href='" + ele.href + "'>"); //.append("<link rel='next' href='" + ele.href + "'>")
  2380. }
  2381. }
  2382. addHelp(SITE.pankuzuUp, "Shift+↑");
  2383. }, (SITE.delay || 0) + 500);
  2384.  
  2385.  
  2386. if (SITE.shiftupKey) setInterval(() => elegeta(SITE.shiftupKey).filter(v => v.innerText.indexOf("(↑)") == -1).forEach(v => v.innerText += " (↑)"), 500)
  2387.  
  2388. if (SITE.leftKey) {
  2389. var leftArrowTimer = setInterval(() => {
  2390. var ele = eleget0(SITE.leftKey);
  2391. if (isinscreen(ele) && !ele.innerText.match0(/\(←\)/)) {
  2392. ele.innerText += " (←)";
  2393. }
  2394. }, 500);
  2395. }
  2396. if (SITE.rightKey) {
  2397. var rightArrowTimer = setInterval(() => {
  2398. var ele = eleget0(SITE.rightKey);
  2399. if (isinscreen(ele) && !ele.innerText.match0(/\(→\)/)) {
  2400. ele.innerText += " (→)";
  2401. }
  2402. }, 500);
  2403. }
  2404.  
  2405. function getallowedGap() {
  2406. if (SITE.allowedGap) return SITE.allowedGap;
  2407. // ヘッダのy下端を計算
  2408. var allowedGap = marginu;
  2409. if (SITE.header) {
  2410. var seigaheader = eleget0(SITE.header);
  2411. if (seigaheader) {
  2412. var tmp = seigaheader.getBoundingClientRect().bottom; // - window.pageYOffset
  2413. if (seigaheader && tmp >= 0) {
  2414. var allowedGap = marginu + tmp;
  2415. }
  2416. }
  2417. }
  2418. if (debug) dc("allowedGap:" + allowedGap);
  2419. // console.log("allowedGap:"+allowedGap+"\nMarginU:"+ marginu+"\nseigaH:"+seigaheader.getBoundingClientRect().bottom,"\noffset:"+window.pageYOffset);
  2420. return allowedGap;
  2421. }
  2422.  
  2423. if (SITE.registFunc) SITE.registFunc();
  2424.  
  2425. //console.log(SITE)
  2426. document.addEventListener("keydown", function(e) {
  2427. if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.isContentEditable || ((e.target.closest('#chat-messages,ytd-comments-header-renderer') || document.activeElement.closest('#chat-messages,ytd-comments-header-renderer')))) return;
  2428. var pressed = (e.shiftKey ? "Shift+" : "") + (e.altKey ? "Alt+" : "") + (e.ctrlKey ? "Ctrl+" : "") + e.key;
  2429. var key = (e.shiftKey ? "Shift+" : "") + (e.altKey ? "Alt+" : "") + (e.ctrlKey ? "Ctrl+" : "") + e.key;
  2430.  
  2431. if (SITE.keyFunc && key === SITE.keyFunc.key) {
  2432. SITE.keyFunc.func(key);
  2433. }
  2434. if (pressed == "Shift+ArrowUp") {
  2435. if (moveClick(SITE.pankuzuUp)) { e.preventDefault(); return; } // Shift上
  2436. else if (moveClick(".sakushaantenna")) { e.preventDefault(); return; } // Shift上
  2437. }
  2438.  
  2439. if (SITE.leftKey && pressed == "ArrowLeft") {
  2440. /*if (typeof SITE.leftKey === "function") SITE.leftKey();
  2441. else*/
  2442. var ele = eleget0(SITE.leftKey);
  2443. if (ele && isinscreen(ele) && ele.offsetHeight) { moveClick(SITE.leftKey, ""); return false; }
  2444. }
  2445. if (SITE.rightKey && pressed == "ArrowRight") {
  2446. var ele = eleget0(SITE.rightKey);
  2447. if (ele && isinscreen(ele)) { moveClick(SITE.rightKey, ""); return false; }
  2448. }
  2449.  
  2450. if (SITE.sibling && (pressed == (SITE.keyPrevSibling || "ArrowLeft") && eleget0test(SITE.sibling))) { // l::前ページにスクロール
  2451. //if (pressed == (SITE.keyPrevSibling || "ArrowLeft") && ((SITE.sibling && eleget0test(SITE.sibling)) || (SITE.prevEpisode && eleget0test(SITE.prevEpisode)))) { // l::前ページにスクロール // comici用版だけどto-tiで問題
  2452. e.preventDefault();
  2453. var nh = getCurrentHeaderBottom();
  2454. var page = SITE?.sortSibling ?
  2455. elegeta(SITE.sibling).filter(e => e.offsetHeight).sort((a, b) => a?.getBoundingClientRect()?.top > b?.getBoundingClientRect()?.top ? -1 : 1).find(e => e.getBoundingClientRect().top - nh + marginu < -(SITE.allowedGap || marginu) - IGNORE_SIBLING_CLOSER_THAN) :
  2456. elegeta(SITE.sibling).filter(e => e.offsetHeight).reverse().find(e => e.getBoundingClientRect().top - nh + marginu < -(SITE.allowedGap || marginu) - IGNORE_SIBLING_CLOSER_THAN)
  2457.  
  2458. if (debug) dc(page?.outerHTML || "nashi")
  2459. if (SITE.prevPage && pressed == "ArrowRight" && eleget0test(SITE.prevPage)) { // right::次ページ サイトごとの特殊処理
  2460. if (moveClick(SITE.prevPage)) { e.stopPropagation(); return false; }
  2461. }
  2462. if (page) {
  2463. sscroll(page);
  2464. e.stopPropagation();
  2465. return false;
  2466. }
  2467. if (SITE.prevEpisode) { moveClick(SITE.prevEpisode); if (SITE.funcNextPrev) SITE.funcNextPrev(); }
  2468. e.stopPropagation();
  2469. return false;
  2470. }
  2471.  
  2472. if (SITE.sibling && (pressed == (SITE.keyNextSibling || "ArrowRight") && eleget0test(SITE.sibling))) { // r::次ページにスクロール
  2473. //if (pressed == (SITE.keyNextSibling || "ArrowRight") && ((SITE.sibling && eleget0test(SITE.sibling)) || (SITE.nextEpisode && eleget0test(SITE.nextEpisode)))) { // r::次ページにスクロール // comici用版だけどto-tiで問題
  2474. e.preventDefault();
  2475.  
  2476. var nh = getCurrentHeaderBottom();
  2477. var page = SITE?.sortSibling ?
  2478. elegeta(SITE.sibling).filter(e => e.offsetHeight).sort((a, b) => a?.getBoundingClientRect()?.top > b?.getBoundingClientRect()?.top ? 1 : -1).find(e => e.getBoundingClientRect().top - nh - marginu > (SITE.allowedGap || marginu) + IGNORE_SIBLING_CLOSER_THAN) :
  2479. elegeta(SITE.sibling).filter(e => e.offsetHeight).find(e => e.getBoundingClientRect().top - nh - marginu > (SITE.allowedGap || marginu) + IGNORE_SIBLING_CLOSER_THAN)
  2480. // elegeta(SITE.sibling).filter(e => $(e).is(":visible")).find(e => e.getBoundingClientRect().top - IGNORE_SIBLING_CLOSER_THAN - nh - marginu > (SITE.allowedGap || marginu) + IGNORE_SIBLING_CLOSER_THAN)
  2481.  
  2482. if (debug) dc(page?.outerHTML || "nashi")
  2483. if (SITE.nextPage && pressed == "ArrowLeft" && eleget0test(SITE.nextPage)) { // left::前ページ サイトごとの特殊処理
  2484. if (moveClick(SITE.nextPage)) { e.stopPropagation(); return false; }
  2485. }
  2486. if (page) {
  2487. sscroll(page);
  2488. e.stopPropagation();
  2489. return false;
  2490. }
  2491. if (moveClick(SITE.nextPage)) { e.stopPropagation(); return false; }
  2492. if (SITE.nextEpisode) { moveClick(SITE.nextEpisode); if (SITE.funcNextPrev) SITE.funcNextPrev(); }
  2493. return false;
  2494. }
  2495. if (SITE.fitFunc && pressed == "a") { // a::漫画画像を画面にフィット
  2496. e.preventDefault();
  2497. fit = fit === "true" ? "false" : "true";
  2498. pref("fit", fit);
  2499. if (fit == "true") {
  2500. popup("A:画像フィット(on)");
  2501. GF.fitfuncBon = 1
  2502. SITE.fitFunc(SITE)
  2503. } else {
  2504. popup("A:画像フィット(off)", "#808080");
  2505. //location.reload()
  2506. GF.fitfuncBon = 0
  2507. elegeta('[data-maxheightbackup]').forEach(e => {
  2508. e.style.maxHeight = e.dataset.maxheightbackup || "none";
  2509. delete e.dataset.maxheightbackup
  2510. })
  2511. }
  2512. }
  2513.  
  2514. if (SITE.nextEpisode && (pressed == "Shift+ArrowRight" || pressed == "Enter")) { // Shift右 enter
  2515. if (moveClick(SITE.nextEpisode)) {
  2516. e.preventDefault();
  2517. if (SITE.funcNextPrev) SITE.funcNextPrev();
  2518. return;
  2519. }
  2520. }
  2521.  
  2522. if (SITE.prevEpisode && (pressed == "Shift+ArrowLeft" || pressed == "]"))
  2523. if (moveClick(SITE.prevEpisode)) {
  2524. e.preventDefault();
  2525. if (SITE.funcNextPrev) SITE.funcNextPrev();
  2526. return;
  2527. } //Shift左 ]
  2528.  
  2529. if (SITE.firstEpisode && pressed == "ArrowRight")
  2530. if (moveClick(SITE.firstEpisode)) { e.preventDefault(); return; } // 右 第1話が押せたら終わる
  2531. if (SITE.lastEpisode && (pressed == "Shift+ArrowRight" || pressed == "Enter"))
  2532. /*if (SITE.lastEpisodePreferential && moveClick(SITE.lastEpisodePreferential)) { e.preventDefault(); return; }
  2533. else*/
  2534. if (moveClick(SITE.lastEpisode)) { e.preventDefault(); return; } // Shift右 enter 最新話が押せたら終わる
  2535.  
  2536. /*if (pressed == "Shift+S") { // shift+s スクロール速度
  2537. e.preventDefault();
  2538. let inp = proInput("スクロール速度を入力してください(0:API使用、1:瞬間移動、1.01~:速度指定)", scrollSpeed, 0, 30);
  2539. if (inp !== null) scrollSpeed = inp === "" ? 1.5 : inp || 0
  2540. pref("scrollSpeed", scrollSpeed);
  2541. }*/
  2542. if (pressed == "Shift+A") { // Shift+a 頭出しオンオフ
  2543. e.preventDefault();
  2544. atamadashi = atamadashi === "true" ? "false" : "true";
  2545. alert("[Shift+a] 頭出し機能を" + atamadashi + "にしました");
  2546. pref("atamadashi", atamadashi);
  2547. }
  2548.  
  2549. if (location.href.match("/manga.nicovideo.jp/watch/|//manga.nicovideo.jp/comic/")) {
  2550. if (pressed == "c") { // c コメントオンオフ
  2551. e.preventDefault();
  2552. eleget0('//li[@id="show_comment"]/span').click();
  2553. return;
  2554. }
  2555. if (pressed == "h") { // h:: ヘッダー固定追従
  2556. e.preventDefault();
  2557. //eleget0('//span[text()="ヘッダー追従"]|//li[@id="siteHeaderRightMenuUnfix" and @style="display: block;"]/a/span|//li[@id="siteHeaderRightMenuFix" and @style="display: block;"]/a/span').click();
  2558. eleget0('//label[@for="commonHeaderFixedSwitch"]').click();
  2559. return;
  2560. }
  2561. }
  2562.  
  2563. if (pressed == "f" || pressed == "[") { // f:: [:: 全画面化
  2564. e.preventDefault();
  2565. var y = window.pageYOffset;
  2566. if (!document.fullscreenElement) {
  2567. let p = document.documentElement.requestFullscreen();
  2568. p.catch(() => {})
  2569. } else {
  2570. if (document.exitFullscreen) {
  2571. let p = document.exitFullscreen();
  2572. p.catch(() => {})
  2573. }
  2574. }
  2575. //setTimeout(window.scroll, 100, 0, y);
  2576. return false;
  2577. }
  2578. },
  2579. // false);
  2580. true);
  2581.  
  2582. // ページクリックでスナップ
  2583. if (!SITE.disableSnapWhenPageIsClicked && SITE.sibling) { // click::
  2584. setTimeout(() => {
  2585. elegeta(SITE.sibling).forEach(e => e.addEventListener("click", function(e) { snap(this, "next", getallowedGap(), SITE.sibling); }, false));
  2586. }, 500);
  2587. }
  2588.  
  2589. // 作者名でWeb漫画アンテナ
  2590. function runAuthor() {
  2591. if (SITE.author) {
  2592. appendlinktoAuthor();
  2593.  
  2594. function appendlinktoAuthor() {
  2595. setTimeout(() => { sakushaantenna(document) }, 500 + (SITE.delay || 0));
  2596. }
  2597. }
  2598. }
  2599. runAuthor()
  2600. observeUrlChanged(runAuthor, 3500)
  2601. document.body.addEventListener('AutoPagerize_DOMNodeInserted', function(evt) { sakushaantenna(evt.target) }, false);
  2602.  
  2603. // 頭出し
  2604. GF.atamaDone = 0;
  2605.  
  2606. function runAtamadashi() {
  2607. if (atamadashi != "true") return;
  2608. if (document.hidden) GF.visichange = document.addEventListener('visibilitychange', () => !GF.atamaDone++ && doAtama(SITE?.atamadashiSpeed), false);
  2609. else SITE?.atamadashiDelay ? setTimeout(() => doAtama(SITE?.atamadashiSpeed), SITE?.atamadashiDelay, 0) : doAtama(SITE?.atamadashiSpeed);
  2610. }
  2611.  
  2612. function doAtama(scrollSpeedForce = null, start = Date.now()) {
  2613. if (atamadashi != "true") return;
  2614. let atama = eleget0(SITE?.atamadashi) || eleget0(SITE?.sibling) //eleget0(SITE.atamadashi)?.getBoundingClientRect()?.top || eleget0(SITE.sibling)?.getBoundingClientRect()?.top;
  2615. if (atama) {
  2616. if (!window.scrollY >= 1) requestAnimationFrame(() => { sscroll(atama, scrollSpeedForce) });
  2617. } else {
  2618. if (Date.now() - start < 5000) setTimeout(scrollSpeedForce => doAtama(scrollSpeedForce, start), 111, scrollSpeedForce)
  2619. }
  2620. }
  2621. runAtamadashi()
  2622.  
  2623. function observeUrlChanged(cb, wait = 333) {
  2624. var observeUrlHasChangedhref = location.href;
  2625. var observeUrlHasChanged = new MutationObserver(mutations => {
  2626. if (observeUrlHasChangedhref !== location.href) setTimeout(() => {
  2627. observeUrlHasChangedhref = location.href;
  2628. cb()
  2629. }, wait)
  2630. });
  2631. observeUrlHasChanged.observe(document, { childList: true, subtree: true });
  2632. }
  2633.  
  2634. if (SITE.func) { SITE.func(); }
  2635. return;
  2636.  
  2637. function snap(targetele, pn, allowedGap, xpath) {
  2638. if (!targetele) return;
  2639. var headery = getCurrentHeaderBottom();
  2640. var nowpagey = targetele.getBoundingClientRect().top + window.pageYOffset - marginu;
  2641. var nextpage = (pn == "next" ? getNextSib(targetele, xpath) : getPrevSib(targetele, xpath));
  2642. if (nextpage)
  2643. if (debug) dc("nextpage:" + nextpage.tagName + "." + nextpage.className + "#" + nextpage.id);
  2644. if (nextpage == null) {
  2645. if (SITE.nextEpisode)
  2646. if (eleget0(SITE.nextEpisode)) { var nextpagey = eleMiddleY(SITE.nextEpisode); } else return;
  2647. else return;
  2648. } else {
  2649. var nextpagey = nextpage.getBoundingClientRect().top + window.pageYOffset - marginu;
  2650. if (debug) dc("nextpagey:" + nextpagey);
  2651. }
  2652. if (nextpage === null && pn == "prev") {
  2653. nextpagey = 0;
  2654. nowpagey = 0;
  2655. if (window.pageYOffset < 2) {
  2656. if (SITE.prevEpisode) { moveClick(SITE.prevEpisode); if (SITE.funcNextPrev) SITE.funcNextPrev(); }
  2657. }
  2658. }
  2659. var nowy = window.pageYOffset + headery;
  2660. if (debug) dc(Math.abs(nowy - nowpagey) + " present gap");
  2661. if (debug) dc(allowedGap + " allowed gap");
  2662. if (Math.abs(nowy - nowpagey) <= allowedGap) {
  2663. sscroll(nextpagey - headery);
  2664. if (nextpage === null) {
  2665. if (pn == "next") {
  2666. if (SITE.nextEpisode) { moveClick(SITE.nextEpisode); if (SITE.funcNextPrev) SITE.funcNextPrev(); }
  2667. }
  2668. }
  2669. } else {
  2670. targetele.focus();
  2671. sscroll(nowpagey - headery);
  2672. }
  2673. return;
  2674. }
  2675.  
  2676. function sakushaantenna(node) {
  2677. elegeta('//a[@class="sakushaantenna"]').forEach(e => e.remove());
  2678. for (let ele of elegeta(SITE.author)) {
  2679. let author = ele.innerText.replace(/(漫画|原作|原案|脚本|著|漫画|作画|イラスト|キャラクター(原案|デザイン)?|画|作|絵|構成|協力)[::\//・]/gmi, "").replace(/\/|/|\,/gmi, " OR ").replace(/作者|原作|作画|著者\s:| ?先生[::\//・]?|[::・]|[\((][^)\)]*[)\)]|=/gmi, " ").replace(/ |・| /g, " ").replace(/^ OR | OR $/gmi, "").trim();
  2680. let pixiv = Math.random() > 0.5 ? `https://www.google.co.jp/search?q=(${encodeURIComponent(author)}+site:www.pixiv.net) OR (${encodeURIComponent(author)}+site:twitter.com)` : `https://duckduckgo.com/?q=(${author}+site:www.pixiv.net) OR (${author}+site:twitter.com)`;
  2681. let link = $('<a class="sakushaantenna" title="右クリックだと\n' + pixiv + '\nを開きます" style="' + "-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; font-size:max(10px,100%); font-weight:bold; margin:0px 5px; text-decoration:none !important; text-align:center; padding:1px 7px 1px; border-radius:15px; " + (ButtonBG) + " white-space: nowrap" + '"href="https://webcomics.jp/search?q=***" rel=\"noopener noreferrer nofollow\"><font color="#ffffff" style="text-decoration:none !important;">Web漫画アンテナ</font></a>'.replace("***", encodeURIComponent(author)))
  2682. link.insertAfter(ele);
  2683. link.on("contextmenu", () => { window.open(pixiv); return false; });
  2684. }
  2685. }
  2686.  
  2687. function loadfocus(times = 0, atamadashi) {
  2688. let xp = atamadashi;
  2689. if (!xp || times > 10000) return false;
  2690. if (eleget0(xp)) { setTimeout(() => { loadfocus2(atamadashi); }, 100); return; } else setTimeout(() => { loadfocus(times + 100, atamadashi); }, 100)
  2691. }
  2692.  
  2693. function loadfocus2(atamadashi) {
  2694. var xp = atamadashi;
  2695. var ele = eleget0(xp);
  2696. if (ele) {
  2697. // sscroll(ele.getBoundingClientRect().top + window.pageYOffset - marginu - getCurrentHeaderBottom());
  2698. sscroll(ele);
  2699. }
  2700. return ele;
  2701. }
  2702.  
  2703. function getNextSib(ele, xpath) { // xpathに適合する弟ノードを走査
  2704. do {
  2705. if (!ele.nextElementSibling) return null;
  2706. ele = ele.nextElementSibling;
  2707. if ($(ele).is(":visible")) {
  2708. for (let ele2 of elegeta(xpath)) {
  2709. if (ele === ele2) return ele;
  2710. }
  2711. }
  2712. } while (ele.nextElementSibling);
  2713. return null;
  2714. }
  2715.  
  2716. function getPrevSib(ele, xpath) { // xpathに適合する兄ノードを走査
  2717. do {
  2718. if (!ele.previousElementSibling) return null;
  2719. ele = ele.previousElementSibling;
  2720. if ($(ele).is(":visible")) {
  2721. for (let ele2 of elegeta(xpath)) {
  2722. if (ele === ele2) return ele;
  2723. }
  2724. }
  2725. } while (ele.previousElementSibling);
  2726. return null;
  2727. }
  2728.  
  2729. function eleMiddleY(xpath) {
  2730. var el2 = eleget0(xpath);
  2731. if (el2) {
  2732. return (el2.getBoundingClientRect().top + window.pageYOffset +
  2733. eleget0(xpath).getBoundingClientRect().height / 2 -
  2734. clientHeight() / 2);
  2735. } else return 0;
  2736. }
  2737.  
  2738. function moveClick(xpath, command = "scrollCenter") {
  2739. let ele = typeof xpath == "function" ? xpath() : eleget0(xpath);
  2740. //if (!ele || ele.offsetHeight == 0) return false; // 不可視要素ならやらない
  2741. if (!ele) return false; // 不可視要素でもやる sukimaでは必要
  2742. //if (Date.now() - latestClick < 1000) return false; // 1秒に1回以上は抑制
  2743. if (command.indexOf("scrollCenter") !== -1 && !SITE.cancelScrollOnChangingEpisode) {
  2744. sscroll(eleMiddleY(xpath), 0.1)
  2745. }
  2746. if (Date.now() - (ele?.dataset?.lascli || 0) < (SITE?.pagenationClickInterval || 3000)) return false; // 3秒に1回以上は抑制
  2747. //if (Date.now() - (ele?.dataset?.lascli || 0) < 3000) return false; // 1秒に1回以上は抑制
  2748. ele.dataset.lascli = Date.now();
  2749. //latestClick = Date.now();
  2750. GM_addStyle("[data-shine4attract] { box-shadow: 0px 0px 10px 10px rgba(0, 250, 0, 0.5), inset 0 0 100px rgba(0, 250, 0, 0.1) !important; outline: rgba(0, 250,0,0.7) solid 4px !important; outline-offset: 1px !important; }")
  2751. ele.dataset.shine4attract = 1
  2752. setTimeout(ele => { if (ele) delete ele.dataset.shine4attract }, 1000, ele)
  2753. if (SITE.moveEpisodeFunc) { // mangazのためだけの処理
  2754. SITE.moveEpisodeFunc(ele);
  2755. } else {
  2756. if (SITE.insteadofClickFunc) { SITE.insteadofClickFunc(ele) } else { ele.click(); }
  2757. }
  2758. return true;
  2759. }
  2760.  
  2761. function elegeta(xpath, node = document) {
  2762. if (!xpath || !node) return [];
  2763. if (typeof xpath === "function") return xpath() || []; // !!!
  2764. // let xpath2 = xpath.replace(/:inv?screen|:visible|:text\*=[^:]*/g, "") // text*=~中で:は使えない
  2765. let xpath2 = xpath.replace(/:inscreenY|:inscreen|:visible|:text\*=[^:]*/g, "") // text*=~中で:は使えない
  2766. let array = []
  2767. try {
  2768. if (!/^\.?\//.test(xpath)) {
  2769. array = [...node.querySelectorAll(xpath2)]
  2770. } else {
  2771. var snap = document.evaluate("." + xpath2, node, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null)
  2772. let l = snap.snapshotLength
  2773. for (var i = 0; i < l; i++) array[i] = snap.snapshotItem(i)
  2774. }
  2775. if (/:visible/.test(xpath)) array = array.filter(e => e.offsetHeight)
  2776. //if (/:invscreen/.test(xpath)) array = array.filter(e => { var eler = e.getBoundingClientRect(); return (eler.bottom >= 0 && eler.top <= document.documentElement.clientHeight) }) // 画面縦内に1ピクセルでも入っている
  2777. if (/:inscreen/.test(xpath)) array = array.filter(e => { var eler = e.getBoundingClientRect(); return (eler.bottom >= 0 && eler.right >= 0 && eler.left <= document.documentElement.clientWidth && eler.top <= document.documentElement.clientHeight) }) // 画面内に1ピクセルでも入っている
  2778. if (/:text\*=./.test(xpath)) { let text = xpath.replace(/^.*:text\*=([^:]*)$/, "$1"); if (text) array = array.filter(e => new RegExp(text).test(e?.textContent)) }
  2779. } catch (e) { alert(`XPath/CSS構文にエラーがあるかもしれません\nブラウザを最新版に更新したり、2023/12以前にインストールしたFirefoxを使っている場合はabout:configlayout.css.has-selector.enabled true にすると解決するかもしれません\n\n${e}\n\n${xpath}`); return []; }
  2780. //} catch (e) { return []; }
  2781. return array
  2782. }
  2783.  
  2784. function eleget0(xpath, node = document) {
  2785. if (!xpath || !node) return null;
  2786. if (typeof xpath === "function") {
  2787. let e = xpath();
  2788. if (Array.isArray(e)) return e?.shift();
  2789. else return e
  2790. } // !!!
  2791. // if (/:inv?screen|:visible|:text\*=/.test(xpath)) return elegeta(xpath, node)?.shift();
  2792. if (/:inscreen|:visible|:text\*=/.test(xpath)) return elegeta(xpath, node)?.shift();
  2793. if (!/^\.?\//.test(xpath)) return node.querySelector(xpath);
  2794. try {
  2795. var ele = document.evaluate("." + xpath, node, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  2796. return ele.snapshotLength > 0 ? ele.snapshotItem(0) : null;
  2797. } catch (e) { alert(`XPath/CSS構文にエラーがあるかもしれません\nブラウザを最新版に更新したり、2023/12以前にインストールしたFirefoxを使っている場合はabout:configlayout.css.has-selector.enabled true にすると解決するかもしれません\n\n${e}\n\n${xpath}`); return null; }
  2798. //} catch (e) { alert(e + "\n" + xpath + "\n" + JSON.stringify(node)); return null; }
  2799. }
  2800.  
  2801. function eleget(xpath) {
  2802. return document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  2803. }
  2804.  
  2805. function sscroll(dy, scrollSpeedForce = null) {
  2806. //console.log(`presentY:${window.pageYOffset} dElement:${dy} dY:${elegeta(SITE.sibling).map(e=>~~e.getBoundingClientRect().top) }`)
  2807. if (dy === undefined || dy === null) return
  2808. sscrollDesEle = null;
  2809. if (typeof dy != "number") {
  2810. sscrollDesEle = dy;
  2811. dy = window.pageYOffset + dy.getBoundingClientRect().top - getCurrentHeaderBottom() - marginu;
  2812. } else { sscrollDesEle = dy; }
  2813. if ((scrollSpeedForce ?? scrollSpeed) < 1) { //APIでスクロール
  2814. if (debug) dc("api使用");
  2815. window.scroll({ left: 0, top: dy, behavior: "smooth" });
  2816. return;
  2817. }
  2818. if ((scrollSpeedForce ?? scrollSpeed) == 1) {
  2819. if (debug) dc("瞬間移動");
  2820. window.scroll({ left: 0, top: dy, behavior: "instant" });
  2821. return;
  2822. }
  2823. //if (debug) dc("scrollSpeed:" + scrollSpeed)
  2824. sscrollY = window.pageYOffset; //chrome
  2825. scrint = 0;
  2826. clearTimeout(GF?.scrint)
  2827. sscrollInt(scrollSpeedForce)
  2828. return;
  2829. }
  2830.  
  2831. function sscrollInt(scrollSpeedForce = null) {
  2832. scrint++;
  2833. sscrollDY = typeof sscrollDesEle == "number" ? sscrollDesEle : window.pageYOffset + sscrollDesEle?.getBoundingClientRect()?.top - getCurrentHeaderBottom() - marginu // : dy//window.pageYOffset
  2834. //sscrollY = sscrollY + Math.max(-333, Math.min(333, (sscrollDY - sscrollY) / (scrollSpeedForce || scrollSpeed)))
  2835. sscrollY = sscrollY + Math.max(-333, Math.min(333, (sscrollDY - sscrollY) / ((scrollSpeedForce || scrollSpeed) * 1.3)))
  2836. window.scroll({ top: sscrollY, behavior: "instant" }); //window.scroll(0, sscrollY);
  2837.  
  2838. let chh = getCurrentHeaderBottom()
  2839. if (Math.abs(sscrollY - sscrollDY) >= 1 || GF?.lastHH?.some(v => v != chh)) {
  2840. clearTimeout(GF?.scrint)
  2841. // GF.scrint = setTimeout(() => sscrollInt(scrollSpeedForce), Math.max(1, 7 - (Date.now() - (GF?.scrEla || 0))))
  2842. requestAnimationFrame(() => sscrollInt(scrollSpeedForce))
  2843. } else {
  2844. //window.scroll({ left: 0, top: sscrollY, behavior: "instant" });
  2845. window.scroll({ left: 0, top: sscrollDY, behavior: "instant" });
  2846. }
  2847. GF.scrEla = Date.now()
  2848. GF.lastHH = [...(GF?.lastHH || []), chh].slice(-5)
  2849.  
  2850. // else console.log("スクロールに掛かった回数(最短1/60秒)…" + scrint + "回");
  2851. }
  2852.  
  2853. function getCurrentHeaderBottom() {
  2854. if (!SITE.header) { return 0; }
  2855. return (SITE?.header == "auto" ? getLikeSticky() : elegeta(SITE.header)).map(e => e.getBoundingClientRect().bottom).reduce((a, b) => Math.max(a, b), 0) + 0;
  2856. }
  2857.  
  2858. function getLikeSticky() { // 画面上端に張り付いてる帯みたいなのを自動的に判断
  2859. if (Date.now() - (GF.stickyTime || 0) > 1500) {
  2860. GF.stickyTime = Date.now();
  2861. GF.sticky = elegeta('header,div:inscreen:visible').filter(e => {
  2862. let p = getComputedStyle(e)?.getPropertyValue("position");
  2863. if (!["sticky", "fixed"].includes(p)) return false;
  2864. let r = e?.getBoundingClientRect();
  2865. let w = window.innerWidth;
  2866. return r?.left < w - w / 3 && r?.right > w / 3 && r?.bottom < window.innerHeight / 3;
  2867. });
  2868. }
  2869. return GF.sticky;
  2870. }
  2871.  
  2872. function proInput(prom, defaultval, min, max = Number.MAX_SAFE_INTEGER) {
  2873. var ret = window.prompt(prom, defaultval)
  2874. if (ret === "") return ret
  2875. if (ret !== null) return Math.min(Math.max(Number(ret.replace(/[A-Za-z0-9.]/g, function(s) {
  2876. return String.fromCharCode(s.charCodeAt(0) - 65248);
  2877. }).replace(/[^-^0-9^\.]/g, "")), min), max)
  2878. return null
  2879. }
  2880.  
  2881. function addHelp(xpath, help) {
  2882. if (!xpath) return;
  2883. let ele = typeof xpath == "function" ? xpath() : eleget0(xpath);
  2884. if (ele) {
  2885. ele.appendChild(document.createElement("span")).innerHTML = "<small> (" + help + ")</small>";
  2886. //console.log("Found:" + xpath);
  2887. }
  2888. return;
  2889. }
  2890.  
  2891. function eleget0test(xpath, node = document) {
  2892. return eleget0(xpath, node)
  2893. }
  2894.  
  2895. function dc(str, force = 0) {
  2896. if (debug == 1) console.log(str);
  2897. if (debug >= 2 || force) popup3(str, 0, 1, 5000, "top");
  2898. return str;
  2899. }
  2900.  
  2901. //var maey = 0;
  2902.  
  2903. function popup3(text, i = 0, lf = 1, timer = 15000, alignY = "bottom") {
  2904. if (text === undefined || text === null) text = "<null>"
  2905. if (typeof text == "string") text = text.slice(0, 200);
  2906. if (typeof text != "number") text = String(text);
  2907. text = text.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/`/g, '&#x60;').replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/gm, "<br>")
  2908. let id = Math.random().toString(36).substring(2);
  2909. let maey = alignY == "bottom" ? 0 : elegeta(".wcspu3top").map(e => e.getBoundingClientRect().bottom).reduce((a, b) => Math.max(a, b), 0) + 2;
  2910. var ele = $(`<span id="wcspu3${id}" class="ignoreMe wcspu3${alignY}" style="all:initial; max-width:33%;font-family:sans-serif; position: fixed; right:0em; ${ alignY }:${((maey) + i * 18)}px; z-index:2147483647; opacity:1; font-size:15px; margin:0px 1px; text-decoration:none !important; padding:1px 6px 1px 6px; word-break: break-all !important; border-radius:12px; background-color:#305088; color:white; ">${ text }</span>`).appendTo('body');
  2911. let ey = ele[0]?.getBoundingClientRect()?.height
  2912. if (ele[0].getBoundingClientRect().bottom >= (window.innerHeight)) {
  2913. elegeta('.wcspu3top').forEach(e => { e.style.top = parseFloat(e?.style?.top) - (ey) - 2 + "px" })
  2914. }
  2915. if (typeof text == "string") { maey += (text.match(/<br>/gmi) || []).length || 0; } //console.log((text.match(/<br>/gmi) || [] ).length) }
  2916. setTimeout(() => {
  2917. eleget0('//span[@id="wcspu3' + id + '"]')?.remove();
  2918. }, timer);
  2919. }
  2920.  
  2921. function pref(name, store = undefined) { // pref(name,data)で書き込み(数値でも文字列でも配列でもオブジェクトでも可)、pref(name)で読み出し
  2922. //if(location.protocol == "file:")return null;
  2923. var domain = getDomain() || location.href;
  2924. if (store === undefined) { // 読み出し
  2925. let data = GM_getValue(domain + " ::: " + name)
  2926. if (data == undefined) return store; // 値がないなら終わり
  2927. if (data.substr(0, 1) === "[") { // 配列なのでJSONで返す
  2928. try { return JSON.parse(data || '[]'); } catch (e) {
  2929. console.log("データベースがバグってるのでクリアします\n" + e);
  2930. pref(name, []);
  2931. return;
  2932. }
  2933. } else return data;
  2934. }
  2935. if (store === "" || store === [] || store === null) { // 書き込み、削除
  2936. GM_deleteValue(domain + " ::: " + name);
  2937. return store;
  2938. } else if (typeof store === "string") { // 書き込み、文字列
  2939. GM_setValue(domain + " ::: " + name, store);
  2940. return store;
  2941. } else { // 書き込み、配列
  2942. try { GM_setValue(domain + " ::: " + name, JSON.stringify(store)); } catch (e) {
  2943. console.log("データベースがバグってるのでクリアします\n" + e);
  2944. pref(name, "");
  2945. }
  2946. return store;
  2947. }
  2948. }
  2949.  
  2950. function isinscreen(ele, wait = "nowait") {
  2951. // if (!ele || (wait == "wait" && $(eleget0('//span[@class="loading-text"]')).is(":visible"))) return 0;
  2952. if (!ele) return;
  2953. var eler = ele.getBoundingClientRect();
  2954. return (eler.top > 0 && eler.left > 0 && eler.left < window.parent.screen.width && eler.top < window.parent.screen.height) && ele.offsetHeight;
  2955. }
  2956.  
  2957. function verb() {
  2958. if (verbose) { for (let str of [...arguments]) { console.log(str + " : " + str) } }
  2959. }
  2960.  
  2961. function popup(text, color = "#3050f0") {
  2962. if (!PopupHelpMS) return
  2963. text = String(text);
  2964. var e = document.getElementById("wscpu");
  2965. if (e) { e.remove(); }
  2966. var e = document.body.appendChild(document.createElement("span"));
  2967. e.innerHTML = '<span id="wscpu" style="all:initial; position: fixed; right:-21em; bottom: 9em; z-index:11000; opacity:1; font-size:12px; font-weight:bold; margin:0px 1px; text-decoration:none !important; text-align:left; padding:1px 6px 1px 6px; border-radius:12px; background-color:' + color + '; color:white; white-space: nowrap;" onclick=\'var a = document.createElement(\"textarea\"); a.value = \"' + text.replace(/<br>/gm, "\\n") + '\"; document.body.appendChild(a); a.select(); document.execCommand(\"copy\"); a.parentElement.removeChild(a);\'">' + text + '</span>';
  2968. var e = document.getElementById("wscpu");
  2969. e.animate([{ right: `${-2-(e.innerText.length)}em` }, { right: "0em" }], { duration: 100, fill: 'forwards' });
  2970. setTimeout((function(e) { return function() { e.remove(); } })(e), PopupHelpMS);
  2971. }
  2972.  
  2973. function getColorFromText(str) {
  2974. var col = 0;
  2975. for (letter of str) { col = (++col * letter.charCodeAt(letter)); }
  2976. return 'hsla(' + (col % 360) + ",100%,50%,5%)";
  2977. }
  2978.  
  2979. function lh(re) { let tmp = location.protocol == "file:" ? null : location.href.match(re); if (!tmp) { return null } else if (tmp.length > 1) { return tmp[1] } else return tmp[0] } // gフラグ不可
  2980. function ld(re) { let tmp = location.protocol == "file:" ? null : location.hostname.match(re); if (!tmp) { return null } else if (tmp.length > 1) { return tmp[1] } else return tmp[0] } // gフラグ不可
  2981. //function lh(re) { let tmp = location.href.match(re); if (!tmp) { return null } else if (tmp.length > 1) { return tmp[1] } else return tmp[0] } // gフラグ不可
  2982. function JS(v) { return JSON.stringify(v) }
  2983.  
  2984. function fitFuncA(headers, pages, interval = 400, additionalFunc = null, footers = "") {
  2985. if (GF.fitfuncBon === undefined) {
  2986. document.addEventListener("scroll", fit);
  2987. elegeta(headers).forEach(e => new MutationObserver(function(record, observer) { fit(1) }).observe(e, { childList: true, attributes: true, characterData: true })) // ヘッダーに些細でも変化(出現・消失・高さ変化等)があればfit
  2988. if (interval) setInterval(() => fit(1), interval)
  2989. window.addEventListener("resize", fit)
  2990. }
  2991. GF.fitfuncBon = 1
  2992. fit();
  2993.  
  2994. function fit(forcefit = 0) {
  2995. if (!GF.fitfuncBon) return
  2996. let headerBottom = elegeta(headers).reduce((a, v) => Math.max(a, v?.getBoundingClientRect().bottom), 0)
  2997. let footerHeight = elegeta(footers).reduce((a, v) => Math.max(a, v?.getBoundingClientRect().height), 0)
  2998. //var maxheight = `calc(${document.documentElement.clientHeight}px - ${marginu*4}px - ${ headerBottom + footerHeight | 0 }px)`;
  2999. var maxheight = `calc(${clientHeight()}px - ${marginu*3}px - ${ headerBottom + footerHeight | 0 }px)`;
  3000. //var maxheight = `calc(100vh - 12px - ${ headerBottom + footerHeight | 0 }px)`;
  3001. elegeta(pages).filter(e => forcefit || e.style.maxHeight != maxheight).forEach(e => {
  3002. e.style.width = "auto";
  3003. //e.style.maxWidth = `${clientWidth() - e.getBoundingClientRect().left}px`;
  3004. if (!e.dataset.maxheightbackup) e.dataset.maxheightbackup = e.style.maxHeight || "none"
  3005. e.style.maxHeight = maxheight
  3006. if (additionalFunc) additionalFunc(e, maxheight)
  3007. })
  3008. }
  3009. }
  3010.  
  3011. function fitFuncB(headers, pages, interval = 400, additionalFunc = null, footers = "") {
  3012. if (GF.fitfuncBon === undefined) {
  3013. document.addEventListener("scroll", fit);
  3014. document.addEventListener("resize", fit);
  3015. elegeta(headers).forEach(e => new MutationObserver(function(record, observer) { fit(1) }).observe(e, { childList: true, attributes: true, characterData: true })) // ヘッダーに些細でも変化(出現・消失・高さ変化等)があればfit
  3016. if (interval) setInterval(() => fit(1), interval)
  3017. }
  3018. GF.fitfuncBon = 1
  3019. fit();
  3020.  
  3021. function fit(forcefit = 0) {
  3022. if (!GF.fitfuncBon) return
  3023. let headerBottom = elegeta(headers).reduce((a, v) => Math.max(a, v?.getBoundingClientRect().bottom), 0)
  3024. let footerHeight = elegeta(footers).reduce((a, v) => Math.max(a, v?.getBoundingClientRect().height), 0)
  3025. elegeta(pages).filter(e => forcefit || isinscreen(e)).forEach(e => {
  3026. e.style.width = "auto";
  3027. if (!e.dataset.maxheightbackup) e.dataset.maxheightbackup = e.style.maxHeight || "none"
  3028. // if(e.offsetHeight>=window.innerHeight-headerBottom-footerHeight)e.style.maxHeight = `calc(100vh - 12px - ${ headerBottom + footerHeight | 0 }px + ${~e.getBoundingClientRect().top}px)`
  3029.  
  3030. e.style.maxHeight = `calc(100vh - 12px - ${ headerBottom + footerHeight | 0 }px + ${~e.getBoundingClientRect().top}px)`
  3031. if (additionalFunc) additionalFunc(e, maxheight)
  3032. })
  3033. }
  3034. }
  3035.  
  3036. function oaco(target) { // observeAndClickOnce(target){ // xpath/cssがヒットする要素を毎秒監視して1回ずつだけクリック
  3037. oaco1()
  3038.  
  3039. function oaco1() {
  3040. elegeta(target).filter(e => !e.dataset.oaco && e.offsetHeight).forEach(e => {
  3041. e.dataset.oaco = 1
  3042. e.click()
  3043. })
  3044. setTimeout(oaco1, 1000)
  3045. }
  3046. }
  3047.  
  3048. function clientHeight() { return Math.min(document.documentElement.clientHeight, window.innerHeight) }
  3049.  
  3050. function clientWidth() { return document.documentElement.clientWidth }
  3051.  
  3052. function before(e, html) { e?.insertAdjacentHTML('beforebegin', html); return e?.previousElementSibling; }
  3053.  
  3054. function begin(e, html) { e?.insertAdjacentHTML('afterbegin', html); return e?.firstChild; }
  3055.  
  3056. function end(e, html) { e?.insertAdjacentHTML('beforeend', html); return e?.lastChild; }
  3057.  
  3058. function after(e, html) { e?.insertAdjacentHTML('afterend', html); return e?.nextElementSibling; }
  3059.  
  3060. function getDomain() {
  3061. return (location.protocol == "file:") ? "file" : (location.href.match(/^https?:\/{2,}(.*?)(?:\/|\?|#|$)/)[1])
  3062. }
  3063.  
  3064. function isinscreenAll(ele) {
  3065. var eler = ele.getBoundingClientRect();
  3066. return (eler.top > 0 && eler.left > 0 && eler.left < document.documentElement.clientWidth && eler.top < document.documentElement.clientHeight);
  3067. } // 全体スッポリ
  3068.  
  3069. function cbOnce(cb) {
  3070. let cbstr = cb.toString();
  3071. if (cbOnce?.done?.has(cbstr)) return;
  3072. cbOnce.done = (cbOnce.done || new Set()).add(cbstr)
  3073. cb()
  3074. }
  3075.  
  3076. })();