diff --git "a/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" "b/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" index eb6d932..3a993a2 100644 --- "a/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" +++ "b/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" @@ -1187,6 +1187,7 @@ e.stopPropagation(); base.showSetting(); }); + doc.on('click', '.listener-dl-confirm', () => Swal.close()); doc.on('click', '.listener-dl-retry', async () => { const adapter = base._activeAdapter; if (!adapter) return; @@ -1452,12 +1453,12 @@ base._updateMainButton(); base._paintLinkCells(); }, - renderErrorPanel(errMsg, adapter) { + renderErrorPanel(errMsg, adapter, okText) { base._activeAdapter = adapter; base.panelFiles = []; Swal.fire({ title: '获取下载链接失败', - html: `
${base.esc(errMsg)}
`, + html: `
${base.esc(errMsg)}
${okText ? `` : ''}
`, allowOutsideClick: false, showCloseButton: true, showConfirmButton: false, width: 860, @@ -4424,11 +4425,10 @@ } let hit = items.filter(it => { let n = this._name(it); - return n && picked.some(t => t.indexOf(n) !== -1); + return n && picked.indexOf(n) !== -1; }); - // 页面上勾了但名字对不上时保留整页,别让面板变空 if (hit.length) items = hit; - else console.warn('[FerryLink] ctfile 勾选没对上文件名:', picked.slice(0, 3), items.map(it => this._name(it)).slice(0, 3)); + else if (items.length) return base.renderErrorPanel('勾选的文件不在本页,或全是文件夹', this, '确认'); if (!items.length) return base.renderErrorPanel('当前目录没有可取的文件,请先进入子文件夹', this); if (items.length >= 100) return base.renderErrorPanel('当前目录文件过多,请进入子文件夹后再试', this); let ids = items.map(it => this._fid(it)); @@ -4596,6 +4596,8 @@ if (t && names.indexOf(t) === -1) names.push(t); }; $('input[type=checkbox], input[type=radio]').filter(function () { return this.checked; }).each(function () { + let n = $(this).attr('aria-label'); + if (n) { if (names.indexOf(n) === -1) names.push(n); return; } let row = $(this).closest('tr, li, [role=row], [class*=row], [class*=item], [class*=card]'); if (row.length) push(row[0]); });