Skip to content

Commit 56d3efe

Browse files
committed
Update DownloadAllContent.user.js
1 parent da468b4 commit 56d3efe

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

DownloadAllContent/DownloadAllContent.user.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ if (window.top != window.self) {
931931
height: 30px;line-height: 30px;display:block;color:#FFF;text-align:center;font-size: 12px;font-weight: bold;font-family: arial;background: initial; float: initial;
932932
}
933933
#txtDownQuit+div{
934-
position:absolute;right:0px;bottom:2px;cursor: pointer;max-width:85px;
934+
position:absolute;right:0px;bottom:2px;cursor: pointer;display: flex;
935935
}
936936
#txtDownQuit+div>button{
937937
background: #008aff;border: 0;padding: 5px;border-radius: 6px;color: white;float: right;margin: 1px;height: 25px;line-height: 16px;cursor: pointer;overflow: hidden;
@@ -1071,7 +1071,7 @@ if (window.top != window.self) {
10711071
console.warn(e);
10721072
}
10731073
}
1074-
function packLink(doc, item, curIndex) {
1074+
function packLink(doc, item) {
10751075
if (customTitle) {
10761076
try {
10771077
let title = doc.querySelector(customTitle);
@@ -1082,9 +1082,6 @@ if (window.top != window.self) {
10821082
console.warn(e);
10831083
}
10841084
}
1085-
if (prefix) {
1086-
item.innerText = prefix.replace(/\$i/g, ++curIndex) + item.innerText;
1087-
}
10881085
}
10891086
function getIframe() {
10901087
if (iframePool && iframePool.length) return iframePool.shift();
@@ -1424,11 +1421,16 @@ if (window.top != window.self) {
14241421
}
14251422
}
14261423
rCats = rCats.filter(function(e){return e!=null});
1424+
if (prefix) {
1425+
for(i=0;i<rCats.length;i++){
1426+
rCats[i]=prefix.replace(/\$i/g, i+1) + rCats[i];
1427+
}
1428+
}
14271429
}
14281430
var waitForComplete;
14291431
function processDoc(i, aTag, doc, cause, check){
14301432
let cbFunc=content=>{
1431-
packLink(doc, aTag, i);
1433+
packLink(doc, aTag);
14321434
let isHref = "";
14331435
let saveUrl = GM_getValue("saveUrl");
14341436
if (saveUrl){

0 commit comments

Comments
 (0)