Skip to content

Commit

Permalink
Deploying to gh-pages from @ fd1f8d5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
maomao1996 committed May 1, 2024
1 parent 3e0d53b commit 219447e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions 115-helper/115-helper.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ==UserScript==
// @name 115小助手
// @namespace https://github.com/maomao1996/tampermonkey-scripts
// @version 1.8.0
// @version 1.8.1
// @description 网盘顶部菜单栏添加链接任务和云下载、SHA1 快速查重(新页面打开)、SHA1 自动查重、删除空文件夹、一键搜(快捷搜索)、SHA1 查重列表支持选中第一个元素和悬浮菜单展示、搜索列表支持悬浮菜单展示、列表显示文件 SHA1 信息、关闭侧边栏、悬浮菜单移除图标、悬浮菜单支持新标签页打开文件夹、加速转码
// @icon https://115.com/favicon.ico
// @author maomao1996
Expand Down Expand Up @@ -95,7 +95,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
},
'layout.hideSidebar': {
section: ['', '界面布局相关设置'],
label: '关闭存储侧边栏',
label: '默认关闭网盘侧边栏',
labelPos: 'right',
type: 'checkbox',
default: false,
Expand Down Expand Up @@ -789,20 +789,24 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
var initMainLayout = function () {
var SIDEBAR_SELECTOR = '[mm-layout="sidebar"]';
var HELPER_SETTING_SELECTOR = '[mm-layout="helper-setting"]';
var $mainSidebar = top.$('.main-sub .sub-footer ul');
G.get('layout.hideSidebar') && top.$('.wrap-hflow .sub-hflow').toggle(0);
var $mainSidebar = top.$('#js-main_leftUI .top-side .navigation-ceiling ul');
if (G.get('layout.hideSidebar')) {
top.$('.wrap-hflow .sub-hflow').hide(0);
}
var initSidebar = function () {
if (top.$(SIDEBAR_SELECTOR).length) {
return;
}
$mainSidebar
.append("<li mm-layout=\"sidebar\"><a href=\"javascript:;\"><p id=\"mm-sidebar\">".concat(top.$('.wrap-hflow .sub-hflow').is(':visible') ? '关闭' : '打开', "</p><p>\u4FA7\u8FB9\u680F</p></a></li>"))
.append("<li mm-layout=\"sidebar\"><a href=\"javascript:;\" style=\"width: auto\"><span id=\"mm-sidebar\">".concat(top.$('.wrap-hflow .sub-hflow').is(':visible') ? '关闭' : '打开', "</span><span>\u4FA7\u8FB9\u680F</span></a></li>"))
.find(SIDEBAR_SELECTOR)
.on('click', function () {
var $sidebar = top.$('.wrap-hflow .sub-hflow');
$sidebar.toggle(200);
setTimeout(function () {
top.$('#mm-sidebar').text($sidebar.is(':visible') ? '关闭' : '打开');
var isVisible = $sidebar.is(':visible');
top.$('#mm-sidebar').text(isVisible ? '关闭' : '打开');
top.localStorage.setItem('wangpan_is_hide', isVisible ? '0' : '1');
}, 200);
});
};
Expand All @@ -811,7 +815,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
return;
}
$mainSidebar
.append("<li mm-layout=\"helper-setting\"><a href=\"javascript:;\"><p>\u5C0F\u52A9\u624B</p><p>\u8BBE\u7F6E</p></a></li>")
.append("<li mm-layout=\"helper-setting\"><a href=\"javascript:;\" style=\"width: auto\"><span>\u5C0F\u52A9\u624B</span><span>\u8BBE\u7F6E</span></a></li>")
.find(HELPER_SETTING_SELECTOR)
.on('click', function () { return (G.isOpen ? G.close() : G.open()); });
};
Expand Down

0 comments on commit 219447e

Please sign in to comment.