From 70176a46a134ad2b2a8a8a745086743e2e9c1b06 Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Wed, 20 Aug 2025 22:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E6=B2=B9?= =?UTF-8?q?=E7=8C=B4=E8=84=9A=E6=9C=AC=E4=BB=BB=E5=8A=A1=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/qas.addtask.user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/static/js/qas.addtask.user.js b/app/static/js/qas.addtask.user.js index 8cf95be..3e6beac 100644 --- a/app/static/js/qas.addtask.user.js +++ b/app/static/js/qas.addtask.user.js @@ -2,7 +2,7 @@ // @name QAS一键推送助手 // @namespace https://github.com/Cp0204/quark-auto-save // @license AGPL -// @version 0.4 +// @version 0.5 // @description 在夸克网盘分享页面添加推送到 QAS 的按钮 // @icon https://pan.quark.cn/favicon.ico // @author Cp0204 @@ -112,7 +112,8 @@ // 获取数据函数 function getData() { const currentUrl = window.location.href; - taskname = currentUrl.lastIndexOf('-') > 0 ? decodeURIComponent(currentUrl.match(/.*\/[^-]+-(.+)$/)[1]).replace('*101', '-') : document.querySelector('.author-name').textContent; + const lastTitle = document.querySelector('.primary .bcrumb-filename:last-child')?.getAttribute('title') || null; + taskname = (lastTitle && lastTitle != "全部文件") ? lastTitle : document.querySelector('.author-name').textContent; shareurl = currentUrl; let pathElement = document.querySelector('.path-name'); savepath = pathElement ? pathElement.title.replace('全部文件', '').trim() : "";