Skip to content

Commit e72bc17

Browse files
committed
Update DownloadAllContent.user.js
1 parent cd0a050 commit e72bc17

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

DownloadAllContent/DownloadAllContent.user.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// @name:zh-TW 怠惰小説下載器
55
// @name:ja 怠惰者小説ダウンロードツール
66
// @namespace hoothin
7-
// @version 2.8.3.7
7+
// @version 2.8.3.8
88
// @description Lightweight web scraping script. Fetch and download main textual content from the current page, provide special support for novels
99
// @description:zh-CN 通用网站内容爬虫抓取工具,可批量抓取任意站点的小说、论坛内容等并保存为TXT文档
1010
// @description:zh-TW 通用網站內容爬蟲抓取工具,可批量抓取任意站點的小說、論壇內容等並保存為TXT文檔
@@ -428,7 +428,7 @@ if (window.top != window.self) {
428428
break;
429429
}
430430
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;
432432

433433
const escapeHTMLPolicy = (win.trustedTypes && win.trustedTypes.createPolicy) ? win.trustedTypes.createPolicy('dac_default', {
434434
createHTML: (string, sink) => string
@@ -515,7 +515,7 @@ if (window.top != window.self) {
515515
filterListContainer = document.createElement("div");
516516
filterListContainer.id = "filterListContainer";
517517
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>
519519
<div id="filterListBody">
520520
<div class="dacCustomRule">
521521
${i18n.custom}
@@ -771,7 +771,7 @@ if (window.top != window.self) {
771771
left: 50%;
772772
top: 10%;
773773
margin-left: -300px;
774-
z-index: 99998;
774+
z-index: 2147483646;
775775
background-color: #ffffff;
776776
border: 1px solid #afb3b6;
777777
border-radius: 10px;
@@ -805,27 +805,28 @@ if (window.top != window.self) {
805805
function initTxtDownDiv() {
806806
if (txtDownContent) {
807807
txtDownContent.style.display = "";
808+
document.body.appendChild(downTxtShadowContainer);
808809
return;
809810
}
810811
txtDownContent = document.createElement("div");
811812
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" });
815816
shadow.appendChild(txtDownContent);
816817
txtDownContent.innerHTML = createHTML(`
817818
<style>
818819
#txtDownContent>div{
819820
font-size:16px;
820821
color:#333333;
821-
width:362px;
822+
width:342px;
822823
height:110px;
823824
position:fixed;
824825
left:50%;
825826
top:50%;
826827
margin-top:-25px;
827-
margin-left:-191px;
828-
z-index:100000;
828+
margin-left:-171px;
829+
z-index:2147483647;
829830
background-color:#ffffff;
830831
border:1px solid #afb3b6;
831832
border-radius:10px;
@@ -884,7 +885,7 @@ if (window.top != window.self) {
884885
saveAs(content, document.title.replace(/[\*\/:<>\?\\\|\r\n,]/g, "_") + ".zip");
885886
});
886887
} 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"});
888889
saveAs(blob, document.title.replace(/[\*\/:<>\?\\\|\r\n,]/g, "_") + ".txt");
889890
}
890891
}

0 commit comments

Comments
 (0)