diff --git a/(改)网盘直链下载助手.user.js b/(改)网盘直链下载助手.user.js
index 16f57a8..3475048 100644
--- a/(改)网盘直链下载助手.user.js
+++ b/(改)网盘直链下载助手.user.js
@@ -404,7 +404,8 @@
},
mount: {
home: "main .homeClass .home-operator .home-operator-button-group",
- share: ".content .content-header-container-wrap .rightInfo"
+ share: ".conter .rightInfo",
+ shareNew: ".content .content-header-container-wrap .rightInfo"
},
dom: {
enhance: `+
此方式下载不会被 IDM 捕获下载链接`,
@@ -6714,7 +6715,42 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$
});
},
greenerPage() {
- // 加个登录按钮很难吗?
+ // 旧版 分享 登录按钮
+ base.waitForKeyElements(".cent > .cent-not-login > .ant-btn", (tag) => {
+ if (tag.hasClass("reg") || tag.hasClass("log")) return;
+ tag.addClass("reg");
+ tag.removeClass("loginRight");
+ tag.find("span").text("注册");
+ if (tag.next().hasClass("log")) return;
+ let button = $(``);
+ button.on("click", () => {
+ let login = new URL(`https://login.123pan.com/centerlogin`);
+ login.searchParams.set("redirect_url", location.href);
+ location.href = login;
+ });
+ tag.after(button);
+ });
+ // 旧版 分享 按钮去除文本
+ base.waitForKeyElements(`.rightInfo .register:not(.pl-button, .pl-button-init),
+ .homeClass > div > .ant-dropdown-trigger:not(.pl-button, .pl-button-init),
+ .homeClass > div > .sysbut`, function (tag) {
+ let hasTextNode = false;
+ tag.contents().each(function () {
+ if (this.nodeType === 3 && $.trim(this.textContent)) {
+ hasTextNode = true;
+ return;
+ }
+ });
+ if (!hasTextNode) return;
+ tag.css({ "width": "38px" });
+ tag.contents().each(function () {
+ if (this.nodeType === 3) {
+ $(this).remove();
+ }
+ });
+ tag.find('svg').css({ "margin-right": "0" });
+ });
+ // 新版 分享 登录按钮
base.waitForKeyElements(".share-header_center > .share-header_center-not-login > .ant-btn", (tag) => {
if (tag.hasClass("reg") || tag.hasClass("log")) return;
tag.removeClass("ant-btn-variant-solid").addClass("ant-btn-variant-outlined");
@@ -6750,7 +6786,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$
}
} catch (e) { }
});
- // 一点都不难。
+ // 新版 分享 超限登录
base.waitForKeyElements(".login-footer-240828", (tag) => {
if (tag.find(".replaced").length) return;
tag.children().each(function () {
@@ -6771,12 +6807,12 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$
}
});
}, true);
- // 不至于连会员都推送会员广告吧……
+ // 旧版 主页 播放器会员广告
base.waitForKeyElements(".new-menu-item-image, .special-menu-item-container-migration--label, .sider-member-btn, .video-new-user-tips", (tag) => {
if (tag.is(":hidden")) return;
tag.hide();
}, true);
- // 少一点花里胡哨
+ // 新版 主页 顶栏会员广告
base.waitForKeyElements('.frontend-layout-header-right > span > [alt^="buttonMall"]', (tag) => {
if (tag.parent().is(":hidden")) return;
tag.parent().hide();
@@ -6784,7 +6820,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$
button.on("click", () => { tag.click() });
tag.parent().after(button);
}, true);
- // 我都用上电脑了……
+ // 分享 手机二维码
base.waitForKeyElements('.rightInfo .qrcode_btn', function (tag) {
tag.hide();
}, true);
@@ -6969,7 +7005,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$
let selectedList = [];
let reactDom = $(".ant-table-wrapper, .tiled-list, .file-list")[0];
let reactObj = base.findReact(reactDom);
- let props = reactObj.return?.pendingProps || reactObj.pendingProps;
+ let props = reactObj.pendingProps;
if (props) {
let fileList = props?.dataSource || props?.loadedFileList || props?.files || [];
let selectedKey = props?.rowSelection?.selectedRowKeys || [];
@@ -7007,6 +7043,25 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$
element.prepend($button);
})
base.waitForKeyElements(config.$123pan.mount.share, (element) => {
+ temp.page = temp.main.detectPage();
+ if ($(".pl-button").length > 0 || !temp.page || temp.page !== 'share') return;
+ let $button = $(`