|
4 | 4 | // @name:zh-TW 怠惰小説下載器 |
5 | 5 | // @name:ja 怠惰者小説ダウンロードツール |
6 | 6 | // @namespace hoothin |
7 | | -// @version 2.8.3.7 |
| 7 | +// @version 2.8.3.8 |
8 | 8 | // @description Lightweight web scraping script. Fetch and download main textual content from the current page, provide special support for novels |
9 | 9 | // @description:zh-CN 通用网站内容爬虫抓取工具,可批量抓取任意站点的小说、论坛内容等并保存为TXT文档 |
10 | 10 | // @description:zh-TW 通用網站內容爬蟲抓取工具,可批量抓取任意站點的小說、論壇內容等並保存為TXT文檔 |
@@ -428,7 +428,7 @@ if (window.top != window.self) { |
428 | 428 | break; |
429 | 429 | } |
430 | 430 | var firefox=navigator.userAgent.toLowerCase().indexOf('firefox')!=-1,curRequests=[],useIframe=false,iframeSandbox=false,iframeInit=false; |
431 | | - var filterListContainer,txtDownContent,txtDownWords,txtDownQuit,dacLinksCon,dacUseIframe,shadowContainer; |
| 431 | + var filterListContainer,txtDownContent,txtDownWords,txtDownQuit,dacLinksCon,dacUseIframe,shadowContainer,downTxtShadowContainer; |
432 | 432 |
|
433 | 433 | const escapeHTMLPolicy = (win.trustedTypes && win.trustedTypes.createPolicy) ? win.trustedTypes.createPolicy('dac_default', { |
434 | 434 | createHTML: (string, sink) => string |
@@ -515,7 +515,7 @@ if (window.top != window.self) { |
515 | 515 | filterListContainer = document.createElement("div"); |
516 | 516 | filterListContainer.id = "filterListContainer"; |
517 | 517 | filterListContainer.innerHTML = createHTML(` |
518 | | - <div id="dacFilterBg" style="height: 100%; width: 100%; position: fixed; top: 0; z-index: 99998; opacity: 0.3; filter: alpha(opacity=30); background-color: #000;"></div> |
| 518 | + <div id="dacFilterBg" style="height: 100%; width: 100%; position: fixed; top: 0; z-index: 2147483646; opacity: 0.3; filter: alpha(opacity=30); background-color: #000;"></div> |
519 | 519 | <div id="filterListBody"> |
520 | 520 | <div class="dacCustomRule"> |
521 | 521 | ${i18n.custom} |
@@ -771,7 +771,7 @@ if (window.top != window.self) { |
771 | 771 | left: 50%; |
772 | 772 | top: 10%; |
773 | 773 | margin-left: -300px; |
774 | | - z-index: 99998; |
| 774 | + z-index: 2147483646; |
775 | 775 | background-color: #ffffff; |
776 | 776 | border: 1px solid #afb3b6; |
777 | 777 | border-radius: 10px; |
@@ -805,27 +805,28 @@ if (window.top != window.self) { |
805 | 805 | function initTxtDownDiv() { |
806 | 806 | if (txtDownContent) { |
807 | 807 | txtDownContent.style.display = ""; |
| 808 | + document.body.appendChild(downTxtShadowContainer); |
808 | 809 | return; |
809 | 810 | } |
810 | 811 | txtDownContent = document.createElement("div"); |
811 | 812 | txtDownContent.id = "txtDownContent"; |
812 | | - let shadowContainer = document.createElement("div"); |
813 | | - document.body.appendChild(shadowContainer); |
814 | | - let shadow = shadowContainer.attachShadow({ mode: "open" }); |
| 813 | + downTxtShadowContainer = document.createElement("div"); |
| 814 | + document.body.appendChild(downTxtShadowContainer); |
| 815 | + let shadow = downTxtShadowContainer.attachShadow({ mode: "open" }); |
815 | 816 | shadow.appendChild(txtDownContent); |
816 | 817 | txtDownContent.innerHTML = createHTML(` |
817 | 818 | <style> |
818 | 819 | #txtDownContent>div{ |
819 | 820 | font-size:16px; |
820 | 821 | color:#333333; |
821 | | - width:362px; |
| 822 | + width:342px; |
822 | 823 | height:110px; |
823 | 824 | position:fixed; |
824 | 825 | left:50%; |
825 | 826 | top:50%; |
826 | 827 | margin-top:-25px; |
827 | | - margin-left:-191px; |
828 | | - z-index:100000; |
| 828 | + margin-left:-171px; |
| 829 | + z-index:2147483647; |
829 | 830 | background-color:#ffffff; |
830 | 831 | border:1px solid #afb3b6; |
831 | 832 | border-radius:10px; |
@@ -884,7 +885,7 @@ if (window.top != window.self) { |
884 | 885 | saveAs(content, document.title.replace(/[\*\/:<>\?\\\|\r\n,]/g, "_") + ".zip"); |
885 | 886 | }); |
886 | 887 | } else { |
887 | | - var blob = new Blob([i18n.info.replace("#t#", location.href) + "\r\n\r\n" + document.title + "\r\n\r\n" + rCats.join("\r\n\r\n")], {type: "text/plain;charset=utf-8"}); |
| 888 | + var blob = new Blob([i18n.info.replace("#t#", location.href) + "\r\n\r\n" + rCats.join("\r\n\r\n")], {type: "text/plain;charset=utf-8"}); |
888 | 889 | saveAs(blob, document.title.replace(/[\*\/:<>\?\\\|\r\n,]/g, "_") + ".txt"); |
889 | 890 | } |
890 | 891 | } |
|
0 commit comments