mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-12 07:10:44 +08:00
This commit is contained in:
parent
36e4b3273d
commit
70176a46a1
@ -2,7 +2,7 @@
|
|||||||
// @name QAS一键推送助手
|
// @name QAS一键推送助手
|
||||||
// @namespace https://github.com/Cp0204/quark-auto-save
|
// @namespace https://github.com/Cp0204/quark-auto-save
|
||||||
// @license AGPL
|
// @license AGPL
|
||||||
// @version 0.4
|
// @version 0.5
|
||||||
// @description 在夸克网盘分享页面添加推送到 QAS 的按钮
|
// @description 在夸克网盘分享页面添加推送到 QAS 的按钮
|
||||||
// @icon https://pan.quark.cn/favicon.ico
|
// @icon https://pan.quark.cn/favicon.ico
|
||||||
// @author Cp0204
|
// @author Cp0204
|
||||||
@ -112,7 +112,8 @@
|
|||||||
// 获取数据函数
|
// 获取数据函数
|
||||||
function getData() {
|
function getData() {
|
||||||
const currentUrl = window.location.href;
|
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;
|
shareurl = currentUrl;
|
||||||
let pathElement = document.querySelector('.path-name');
|
let pathElement = document.querySelector('.path-name');
|
||||||
savepath = pathElement ? pathElement.title.replace('全部文件', '').trim() : "";
|
savepath = pathElement ? pathElement.title.replace('全部文件', '').trim() : "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user