├── .env.production
├── .env.development
├── .vscode
└── extensions.json
├── src
├── vite-env.d.ts
├── lib
│ └── Counter.svelte
├── app.css
├── main.js
├── sites
│ ├── index.js
│ ├── mteam.js
│ ├── kamept.js
│ ├── _index.svelte
│ ├── kamept.svelte
│ └── mteam.svelte
├── assets
│ ├── vite.svg
│ └── svelte.svg
├── component
│ ├── btnTurnPage.svelte
│ ├── switch.svelte
│ └── toggle.svelte
├── default.config.js
├── stores
│ └── index.js
├── main.svelte
├── utils
│ ├── index.js
│ └── masonry.pkgd.min.js
└── sidepanel.svelte
├── .gitignore
├── package.json
├── vite.config.js
├── userscript.config.js
├── jsconfig.json
├── README.md
└── pnpm-lock.yaml
/.env.production:
--------------------------------------------------------------------------------
1 | VITE_APP_ENV = 'production'
--------------------------------------------------------------------------------
/.env.development:
--------------------------------------------------------------------------------
1 | VITE_APP_ENV = 'development'
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["svelte.svelte-vscode"]
3 | }
4 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ////
5 |
--------------------------------------------------------------------------------
/src/lib/Counter.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sveltegreasytest",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "sh ./build.sh",
9 | "build:normal": "vite build --minify false",
10 | "build:minify": "vite build",
11 | "preview": "vite preview"
12 | },
13 | "devDependencies": {
14 | "@sveltejs/vite-plugin-svelte": "2.2.0",
15 | "svelte": "^3.59.0",
16 | "vite": "^4.3.5",
17 | "vite-plugin-monkey": "^3.2.0"
18 | }
19 | }
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import { svelte } from '@sveltejs/vite-plugin-svelte';
3 | import monkey from 'vite-plugin-monkey';
4 | // --------------------
5 | import { config } from './userscript.config.js'
6 |
7 | // https://vitejs.dev/config/
8 | export default defineConfig({
9 | build: {
10 | minify: true,
11 | },
12 | plugins: [
13 | svelte(),
14 | monkey({
15 | entry: 'src/main.js',
16 |
17 | // NOTE: 详细油猴文件头配置见 ./userscript.config.js
18 | userscript: config
19 | }),
20 | ],
21 | });
22 |
--------------------------------------------------------------------------------
/userscript.config.js:
--------------------------------------------------------------------------------
1 | export const config = {
2 | name: {
3 | "": "PT种子列表瀑布流视图(Svelte重构)",
4 | en: "PT_Masonry_View_Svelte",
5 | },
6 | icon: "https://avatars.githubusercontent.com/u/23617963",
7 | namespace: "https://github.com/KesaubeEire/PT_Masonry_View_Svelte",
8 | description: {
9 | "": "PT种子列表无限下拉瀑布流视图(Svelte重构)",
10 | en: "PT Masonry View by Svelte.",
11 | },
12 | author: "Kesa",
13 | match: [
14 | "https://kamept.com/*",
15 | "https://kp.m-team.cc/*",
16 | "https://pterclub.com/*",
17 | ],
18 | exclude: [
19 | "*/offers.php*",
20 | "*/index.php*",
21 | "*/forums.php*",
22 | "*/viewrequests.php*",
23 | "*/seek.php*",
24 | ],
25 | grant: "none",
26 | license: "MIT",
27 |
28 | // NOTE: 经常修改这里就行了
29 | version: "1.1.0",
30 | }
--------------------------------------------------------------------------------
/src/app.css:
--------------------------------------------------------------------------------
1 | /* 瀑布流主容器 */
2 | div.waterfall {
3 | width: 100%;
4 | padding-top: 20px;
5 | padding-bottom: 60px;
6 | border-radius: 20px;
7 | height: 100%;
8 |
9 | /* margin: 0 auto; */
10 | margin: 20px auto;
11 |
12 | transition: height 0.3s;
13 | }
14 |
15 | /* 调试按键统一样式 */
16 | button.debug {
17 | position: fixed;
18 | top: 10px;
19 | right: 10px;
20 | padding: 4px;
21 | background-color: #333;
22 | color: #fff;
23 | border: none;
24 | border-radius: 5px;
25 | cursor: pointer;
26 | }
27 |
28 | /* 调试按键1: 显示隐藏原种子列表 */
29 | button#toggle_oldTable {
30 | top: 10px;
31 | }
32 |
33 | /* 调试按键2: Masonry 切换卡片宽度 */
34 | button#btnReLayout {
35 | top: 40px;
36 | }
37 |
38 | /* 调试按键3: 切换下一页加载方式 */
39 | button#btnSwitchMode {
40 | top: 70px;
41 | }
42 |
43 | /* 调试按键4: Masonry 重新排列 */
44 | button#sort_masonry {
45 | top: 100px;
46 | }
47 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import App from './main.svelte';
2 | import { GET_TORRENT_LIST_SELECTOR } from './sites/index.js';
3 | // -------------------------------------------------------------
4 |
5 | export { _ORIGIN_TL_Node };
6 |
7 | // -------------------------------------------------------------
8 |
9 | console.log("________PT-TorrentList-Masonry________");
10 |
11 | // -------------------------------------------------------------
12 | /** 相应站点的种子列表 selector */
13 | const list_selector = GET_TORRENT_LIST_SELECTOR();
14 | /**原种子列表DOM */
15 | const _ORIGIN_TL_Node = document.querySelector(list_selector);
16 |
17 | // 没有相应站点的种子列表 selector 或 种子列表 dom 不存在 就不进行整个程序
18 | if (list_selector && !!_ORIGIN_TL_Node) {
19 | const app = new App({
20 | target: (() => {
21 | const app = document.createElement('div');
22 | document.body.append(app);
23 | return app;
24 | })(),
25 | });
26 | }
27 | else { console.log('未识别到种子列表捏~') }
28 |
--------------------------------------------------------------------------------
/src/sites/index.js:
--------------------------------------------------------------------------------
1 | import { config as config_Kame } from "./kamept";
2 | import { config as config_Mteam } from "./mteam";
3 |
4 | /** 站点参数相关参数顶层对象 */
5 | const SITE = {
6 | "kamept.com": config_Kame,
7 | "kp.m-team.cc": config_Mteam,
8 | };
9 |
10 | /** 获得当前PT站的名字 @returns 当前PT站名 */
11 | function GET_CURRENT_PT_DOMAIN() {
12 | const domain = window.location.hostname;
13 | // 输出当前链接的域名
14 | // console.log("当前站点: ", domain);
15 | return domain;
16 | }
17 |
18 | /** 判断该页面是否存在种子列表
19 | * @returns selector
20 | */
21 | function GET_TORRENT_LIST_SELECTOR() {
22 | const domain = GET_CURRENT_PT_DOMAIN();
23 | console.log("|-> 当前站点: ", domain);
24 | console.log('|-> 当前页面: ', window.location.pathname);
25 |
26 | const res = SITE[domain]?.torrentListTable ?? null;
27 | console.log('|-> 站点selector:', res);
28 | return res
29 | }
30 |
31 | export {
32 | GET_CURRENT_PT_DOMAIN,
33 | SITE as GLOBAL_SITE,
34 | GET_TORRENT_LIST_SELECTOR,
35 | }
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "Node",
4 | "target": "ESNext",
5 | "module": "ESNext",
6 | /**
7 | * svelte-preprocess cannot figure out whether you have
8 | * a value or a type, so tell TypeScript to enforce using
9 | * `import type` instead of `import` for Types.
10 | */
11 | "importsNotUsedAsValues": "error",
12 | "isolatedModules": true,
13 | "resolveJsonModule": true,
14 | /**
15 | * To have warnings / errors of the Svelte compiler at the
16 | * correct position, enable source maps by default.
17 | */
18 | "sourceMap": true,
19 | "esModuleInterop": true,
20 | "skipLibCheck": true,
21 | "forceConsistentCasingInFileNames": true,
22 | "baseUrl": ".",
23 | /**
24 | * Typecheck JS in `.svelte` and `.js` files by default.
25 | * Disable this if you'd like to use dynamic types.
26 | */
27 | "checkJs": true
28 | },
29 | /**
30 | * Use global.d.ts instead of compilerOptions.types
31 | * to avoid limiting type declarations.
32 | */
33 | "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
34 | }
35 |
--------------------------------------------------------------------------------
/src/assets/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/component/btnTurnPage.svelte:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
37 |
50 |
51 |
52 |
68 |
--------------------------------------------------------------------------------
/src/assets/svelte.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/default.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 各种默认参数
3 | */
4 |
5 | import { get } from 'svelte/store';
6 | import { _card_width } from './stores';
7 |
8 | /** 瀑布流卡片相关参数顶层对象 */
9 | const CARD = {
10 | /** 瀑布流卡片宽度 */
11 | CARD_WIDTH: get(_card_width),
12 |
13 | /** NOTE: 瀑布流卡片边框宽度 -> 这个2是真值, 但是边框好像是会随着分辨率和缩放变化, 给高有利大分辨率, 给低有利于小分辨率 */
14 | CARD_BORDER: 0,
15 |
16 | /** 瀑布流卡片索引 */
17 | CARD_INDEX: 0,
18 |
19 | /** 图片悬浮预览方式
20 | * 0: 一律放大到全视窗[默认]
21 | * 1: 最小为原图
22 | */
23 | PIC_HOVER_STYLE: 0,
24 | };
25 |
26 | /** 翻页相关参数顶层对象 */
27 | // @ts-ignore
28 | const PAGE = {
29 | /** 翻页: 底部检测时间间隔 */
30 | GAP: 3000,
31 |
32 | /** 翻页: 底部检测视点与底部距离 */
33 | DISTANCE: 300,
34 |
35 | /** 翻页: 是否为初始跳转页面 */
36 | IS_ORIGIN: true,
37 |
38 | /** 翻页: 初始页面 */
39 | PAGE_ORIGIN: 0,
40 |
41 | /** 翻页: 当前页数 */
42 | PAGE_CURRENT: 0,
43 |
44 | /** 翻页: 下一页数 */
45 | PAGE_NEXT: 0,
46 |
47 | /** 翻页: 下一页的链接 */
48 | NEXT_URL: "",
49 |
50 | /** 翻页: 下一页的加载方式: Button | Slip */
51 | SWITCH_MODE: "Button",
52 | };
53 |
54 | /** 网站图标链接 */
55 | // @ts-ignore
56 | const ICON = {
57 | /** 大小图标 */
58 | SIZE: '
',
59 | /** 评论图标 */
60 | COMMENT:
61 | '',
62 | /** 上传人数图标 */
63 | SEEDERS:
64 | '
',
65 | /** 下载人数图标 */
66 | LEECHERS:
67 | '
',
68 | /** 已完成人数图标 */
69 | SNATCHED:
70 | '
',
71 | /** 下载图标 */
72 | DOWNLOAD:
73 | '
',
74 | /** 未收藏图标 */
75 | COLLET:
76 | '
',
77 | /** 已收藏图标 */
78 | COLLETED: '
',
79 | };
80 |
81 | export { CARD, PAGE, ICON }
--------------------------------------------------------------------------------
/src/stores/index.js:
--------------------------------------------------------------------------------
1 | import { writable } from 'svelte/store';
2 | import { sortMasonry } from "../utils";
3 |
4 | // ----------------------------------------------------------------
5 |
6 | /** 持久化 Stores -> 配置联动 localstorage*/
7 | function persistStore(key, startValue) {
8 | const savedValue = localStorage.getItem(key);
9 | const initialValue = savedValue ? JSON.parse(savedValue) : startValue;
10 | const store = writable(initialValue);
11 |
12 | store.subscribe(value => {
13 | localStorage.setItem(key, JSON.stringify(value));
14 | });
15 |
16 | return store;
17 | }
18 |
19 | // ----------------------------------------------------------------
20 |
21 | // 全局类变量 -------------------------------------
22 | /** 全局Masonry */
23 | export const _Global_Masonry = writable({});
24 |
25 | /** 显示模式: 表格(0) or 瀑布流(1) */
26 | export const _show_mode = persistStore('_showMode', 1);
27 |
28 | // iframe变量 -------------------------------------
29 | /** iframe 开关 */
30 | export const _iframe_switch = writable(0)
31 | /** iframe 网址 */
32 | export const _iframe_url = writable('https://kamept.com/index.php')
33 |
34 | // 站点类变量 -------------------------------------
35 | /** 当前所在站点域名 */
36 | // export const _current_domain = writable("")
37 | export const _current_domain = persistStore('_domain', "");
38 |
39 | /** 当前所在站点背景颜色 */
40 | export const _current_bgColor = persistStore('_bgColor', "");
41 |
42 | // 配置类变量 -------------------------------------
43 | /** 是否显示原始种子列表 */
44 | export const _show_originTable = writable(0)
45 | // export const _show_originTable = persistStore('_show_ori_table', 0);
46 |
47 | /** 是否显示侧边栏 */
48 | export const _show_configPanel = writable(false)
49 |
50 | /** 侧边栏位置: x->left y->top */
51 | export const _panelPos = persistStore('_panelPos', { x: 0, y: 0 })
52 |
53 | /** 加载下一页方式: 点击false(0) 滚动true(1) */
54 | export const _turnPage = persistStore('_turnPage', false);
55 |
56 | /** 是否显示侧边栏 debug 按钮 */
57 | export const _show_debug_btn = persistStore('_show_debug_btn', 0);
58 |
59 | /** 是否显示鼠标悬浮预览大图 */
60 | export const _show_nexus_pic = persistStore('_show_nexus_pic', 1);
61 |
62 | /** 是否延迟显示悬浮预览大图 */
63 | export const _delay_nexus_pic = persistStore('_delay_nexus_pic', 600);
64 |
65 | // 卡片类变量 -------------------------------------
66 | /** 卡片宽度 */
67 | // export const _card_width = writable(200);
68 | export const _card_width = persistStore('_card_width', 200);
69 |
70 | /** 卡片设置: 全站点配置 & 各个站点配置 */
71 | const site_setting = {
72 | mt: {
73 | // 隐藏gay卡片: 默认为true
74 | hide_gay: true
75 | }
76 | }
77 | export const _SITE_SETTING = persistStore('_SITE_SETTING', site_setting);
78 | let mark1 = false
79 | _SITE_SETTING.subscribe(value => {
80 | // 初始化时不寻找 masonry
81 | if (!mark1) {
82 | mark1 = true;
83 | }
84 | else {
85 | sortMasonry('fast');
86 | sortMasonry('fast');
87 | sortMasonry();
88 | sortMasonry();
89 | }
90 | })
91 |
92 | /** 卡片显示_总开关 */
93 | const show_switch = {
94 | // 全局总开关
95 | all: false,
96 |
97 | // 显示标题
98 | title: true,
99 | // 显示置顶和免费
100 | free: false,
101 | // 显示副标题
102 | sub_title: false,
103 | // 显示标签
104 | tags: false,
105 | // 显示大小&下载&收藏
106 | size_download_collect: false,
107 | // 显示上传时间
108 | upload_time: false,
109 | // 显示评论/上传/下载/完成
110 | statistics: false,
111 | }
112 | // export const _CARD_SHOW = writable(show_switch);
113 | export const _CARD_SHOW = persistStore('_card_show', show_switch);
114 | let mark = false;
115 | _CARD_SHOW.subscribe(value => {
116 | // console.log(get(_CARD_SHOW));
117 |
118 | // 初始化时不寻找 masonry
119 | if (!mark) {
120 | mark = true;
121 | }
122 | else {
123 | sortMasonry('fast');
124 | sortMasonry('fast');
125 | sortMasonry();
126 | sortMasonry();
127 | }
128 | });
129 |
130 |
131 |
--------------------------------------------------------------------------------
/src/main.svelte:
--------------------------------------------------------------------------------
1 |
106 |
107 |
108 | {#if $_iframe_switch}
109 |
110 |
111 |
120 |
121 | {/if}
122 |
123 |
124 |
125 |
126 |
146 |
--------------------------------------------------------------------------------
/src/component/switch.svelte:
--------------------------------------------------------------------------------
1 |
32 |
33 |
34 |
35 | {#if label}
36 |
68 |
{label}
69 | {/if}
70 |
71 |
72 | {title_fixed}
73 |
74 | {#if title_green || title_red}
75 | :
76 |
77 | {#if green_state}
78 | {#if checked}
79 |
{title_green}
80 | {:else}
81 |
{title_red}
82 | {/if}
83 | {:else if checked}
84 |
{title_red}
85 | {:else}
86 |
{title_green}
87 | {/if}
88 | {/if}
89 |
90 |
91 |
92 | {#if type == "switch"}
93 |
94 | {
99 | console.log(title_fixed, checked);
100 | if (func != null) func();
101 | }}
102 | />
103 |
104 |
105 | {/if}
106 |
107 |
108 | {#if type == "range"}
109 |
110 | {/if}
111 |
112 |
113 |
207 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 为 PT 站点 打造的种子列表瀑布流视图 (现支持 Kame & MT)
2 |
3 |
4 | 
5 |
6 |
7 | 预览视频:
8 |
9 | https://user-images.githubusercontent.com/20382002/236703818-427840b9-aaee-4133-9185-59244245cb7b.mov
10 |
11 |
12 |
13 |
14 | | 新版 | 旧版 |
15 | |-----|-----|
16 | | [github 项目地址~](https://github.com/KesaubeEire/PT_Masonry_View_Svelte) | [旧版 github 项目地址~](https://github.com/KesaubeEire/PT_TorrentList_Masonry) |
17 | | [油猴 项目地址~](https://greasyfork.org/zh-CN/scripts/470821) | [旧版 油猴 项目地址~](https://greasyfork.org/zh-CN/scripts/465249-pt种子列表无限下拉瀑布流视图) |
18 |
19 |
20 | ---
21 |
22 | ## 简介
23 |
24 | RT, 本油猴脚本专为 PT 打造, 让你顺畅划划点点, 一页爽逛种子超市!
25 | 欢迎为项目提 [issue](https://github.com/KesaubeEire/PT_Masonry_View_Svelte/issues) 以及留言配置您想适配的站点~
26 |
27 | 相关事宜如果您在 tg 能找到我也可以直接联系我~
28 |
29 |
30 |
31 | ---
32 |
33 | ## 使用说明
34 |
35 | 0. 注意事项
36 | 1. 建议使用 Chrome 浏览器, 火狐等其他浏览器可能存在不知名问题(from tg by 天 胖)
37 | 2. **不支持 Dark Passion 主题!!! 推荐 blue gene 主题!!!**
38 |
39 | 1. 本脚本功能:
40 | 1. 对现有的种子列表模式进行增强
41 | 1. 点击图片可以在内部窗口查看种子详情! 不需要新打开表情页了!!!
42 | 1. 支持在已适配的站点将种子列表变为瀑布流视图
43 | 1. 在侧边栏区域可以设置各种配置
44 | 1. 可以拖拽侧边栏位置
45 | 1. 可以切换显示模式: 原表格模式 & 瀑布流模式
46 | 1. 可以呼出详细配置面板配置细节
47 | (所有配置都能在同一个站点记忆, 不同的站点之间配置不共享)
48 | 1. 如果找不到侧边栏, 页面最下面有 "重置瀑布流配置边栏位置" 的按钮
49 | 1. 鼠标悬浮预览
50 | 1. 鼠标悬浮在卡片非图片区域可以显示种子详细数据内容
51 | 1. 鼠标悬浮在标题区域可以显示标题全称, 默认只显示最多两行
52 | 1. 鼠标悬浮在图片上可以预览大图(可以调整是否延迟显示大图以防止大图在无意中触发)
53 | 1. 点击图片可以在内部窗口查看种子详情! 不需要新打开表情页了!!!
54 | 1. 点击列和列之间的间隙也可以整理布局! 不需要鼠标移到右上角了!!!
55 | 1. 图片懒加载: 对电脑性能和服务器负担都比较小~
56 | 1. 滑动或按钮可以无缝显示下一页的内容, 表格模式 & 瀑布流模式都支持!
57 | 2. 推荐设置:
58 |
59 | 1. 如果 PT 站点是 NexusPHP 架构, 推荐将主题改为 Blue Gene
60 | (一般更改主题方式: 控制面板->网站设定->界面风格)
61 | 1. 某些站点限制网页刷新频率, 所以默认翻页是要点按钮的,
62 | 可以右上手动改为自动检测翻页, 请理解~
63 |
64 | ---
65 |
66 |
67 | TODO LIST
68 |
69 | - 宏观类
70 | - [ ] TODO: 在 readme.md 中把架构图画出来以防屎山(from tg by @兔纸)
71 |
72 | - 功能类
73 | - [ ] 原 table 也随着滑动到底部自动添加数据
74 | - [ ] TODO: ( 类似index的位置 )显示当前是否下载以及下载进度(from tg by @Charlie Swift)
75 | - [ ] TODO: 配置按钮区域可拖动
76 | - [ ] 排序区按钮(from tg by 天 胖)
77 | - [ ] 卡片宽度 & 间距宽度 调整
78 | - [ ] 简洁模式 & 详细模式 切换
79 | - [ ] 跟随预览 & 中间预览 切换(from tg by 天 胖)
80 | - [x] 加个 ESC 按钮退出 iframe 显示(from tg by LNN)
81 | - [x] Nexus 触摸显示大图放个半秒再显示?避免划过显示一堆不想看的?(from tg by LNN & 龟龟)
82 | - [x] 配置一下标题的隐藏(from tg by LNN)
83 | - [x] 侧边栏右侧位置保护(from tg by 天 胖)
84 | - [x] 将是否打开原有列表记忆在 localstorage 里(from tg by 天 胖)
85 | - [x] 给列表模式加点击 iframe 显示详情(from tg by 天 胖)
86 | - [ ] TODO: 排列模式:按照列的模式加紧(from tg by 天 胖)
87 |
88 | - 样式类
89 | - [x] iframe 两侧颜色降低亮度(from tg by LNN)
90 | - [x] 边栏整体向 bilibili-evolve 看齐(from tg by LNN)
91 | - [x] MT卡片分类文字居中(from tg by 天 胖)
92 | - [ ] TODO: 将 'new' 'hot' 和 index 一样放在图片上下左右
93 | - [ ] TODO: 改改阴影, 学习 [如何用 CSS 中写出超级美丽的阴影效果](https://juejin.cn/post/7034323356459466760)(from tg by Kyaru)
94 | - [ ] 刚进种子页面会出现蚂蚁线, 考虑改进一下?(from tg by LNN)
95 |
96 |
97 | - 站点指定修改类
98 | - [x] Kame: 给龟站的搜索箱默认设置为"不扩展", 否则平常占地方(from tg by LNN)
99 | - [x] Kame: "点此查看即将断种资源" 文字设置为黑色(from tg by LNN)
100 | - [x] Kame: 勋章 z-index 较低会被卡片挡住(from tg by bacz)
101 |
102 | - 说明类
103 | - [ ] github & 油猴介绍 数据脱敏 (from tg by 天 胖)
104 | - [ ] 问一下每个站点的管理有没有必要
105 | - [ ] 去除匹配站点的域名展示
106 | - [ ] 去除匹配站点的原始匹配
107 |
108 |
109 |
110 | ---
111 |
112 |
113 | 旧版历史 TODO LIST
114 |
115 | - 其他事务
116 | - [x] 将 油猴脚本从成人区撤离, 改为正常
117 | - [x] 将 特别区作为截图示范, 添加 /special.php 的适配
118 | - 功能列表
119 |
120 | - [x] 懒加载(from tg by @兔纸)
121 | - [x] 懒加载完成后新图片出来之际整理瀑布流
122 | - [x] 修复了一些小的懒加载不出图的小 bug
123 | - [x] 触摸图片预览原图(from tg by @兔纸)
124 | - [x] 修正右边图片的预览位置
125 | - [x] 抄[某 pixiv 油猴脚本](https://github.com/Ocrosoft/PixivPreviewer)的实现(from tg by @兔纸) 失败了, 有点复杂
126 | - [x] 自己改了改, 基本修正了
127 | - [x] 更好的四空间(四叉树)改造法基本完成, 等待大家反馈意见
128 | - [x] 做一个切换显示方式(尽量原图&最大显示)的切换变化, panel 完成后搞
129 | - [x] 默认将自动翻页改为按键翻页(from tg by @兔纸)
130 | - [x] 抄 NGA 的方式下拉到底后触点下一页(from tg by @兔纸) 不太好用捏
131 | - [x] 给滑动翻页加一个防抖, 时间可以久一点
132 | - [x] 瀑布流基础排版
133 | - [x] 滑动到底部刷新页面
134 | - [x] 美化卡片内信息布局 & 样式
135 |
136 | - [x] 抄鲨鱼的 UI 样式, Free 的提示什么的(from tg by @兔纸) 用原样了捏
137 | - [x] 基本布局
138 | - [x] 点击整个卡片跳转(from tg by @风言)
139 | - [x] 没有完全弄成那样, 会妨碍下载和收藏, 把图片和副标题点击跳网页做了
140 | - [x] 点击卡片不是打开新页面,而是在本页面打开 iframe 直接看内容,看完关掉,都不用切换页面了
141 | - [x] 卡片背景颜色适配主题(from tg by @LNN)
142 | - [x] 去掉副标题(from tg by @lslqtz)
143 | - [x] 右上角按钮 z-index 置顶(from tg by @lslqtz)
144 | - [x] 标签样式改为 div 的多行 flex(from tg by @bacz)
145 |
146 | - [ ] 将一些参数配置为可变
147 |
148 | - [x] 配置 LocalStorage 记录参数捏
149 | - [x] 单列宽度可调整(已 api 实现, 还需要简化操作方式)
150 | - [x] UI 化宽度调整 -> 右上角可设置单列 200px / 300px 切换
151 | - [ ] 分卡片固定宽度模式和列数固定宽度模式
152 | - [x] 卡片固定宽度模式: 默认模式
153 | - [ ] 列数固定宽度模式: 默认固定列数可调, 不少于 x 列 (from tg by @兔纸)
154 | - [ ] 设置详情文字(副标题)和标签左对齐 or 居中(from tg by @阴天)
155 | - [x] 配置可以忽略详情只剩标题图片的简略模式
156 | - [x] MT 已适配
157 |
158 | - [ ] 花样小 bug
159 |
160 | - [x] 下载按钮 href
161 | - [x] 改为宽列后, 新增的卡片仍然按照原先的列宽生成卡片
162 | - [x] 当下拉页没有新内容时控制台优雅报错
163 | - [x] 缩放小于 95% 时右侧有空隙 -> 不清楚真实的 4K 屏幕会不会有影响, 只能先这样设置边框为 3px
164 | - [x] 点击收藏后刷新页面 or 直接更新收藏图标
165 | - [ ] UI 提示
166 | - [x] 标题过长的话半透明背景可能会导致文字与图片重叠 (from tg by @bacz)
167 | - [x] 测试网站地址漏了 (from tg by @bacz)
168 | - [x] 收藏按钮样式调整 (from tg by @bacz)
169 | - [x] 图片链接多此一举了, 直接搬原链即可 (from tg by @Kyaru)
170 | - [x] 预览大图片的 bug 基本修完, 可继续改进
171 | - [x] 集成 Masonry.js 到项目, 非常感谢胖哥!!!(from tg by 天 胖)
172 | - [x] 让下载和收藏都变成隐藏按钮: 现在下载还不是隐藏按钮
173 | - [ ] ...
174 |
175 | - [x] 站点状态对齐
176 | - [x] KamePT.js: 最新
177 | - [x] (卡片顶部种类样式待更新)
178 | - [x] free 时间被搞到了临时标签里, 取出来
179 | - [x] MTeam.js: 最新
180 | - [x] PTer.js: 最新
181 |
182 |
183 |
184 | 记录一些小小的暴论(嘻嘻本人不要打我)
185 | 1. 违反用户直觉的都是垃圾程序 by兔纸(2023/05/08 18:39)
186 |
187 |
188 |
--------------------------------------------------------------------------------
/src/component/toggle.svelte:
--------------------------------------------------------------------------------
1 |
32 |
33 | {#if design == "inner"}
34 |
35 | {label}
36 |
45 |
46 | {:else if design == "slider"}
47 |
48 | {label}
49 |
55 |
56 | {:else}
57 |
58 |
65 |
{label}
66 | {#each options as option}
67 |
73 |
76 | {/each}
77 |
78 |
79 | {/if}
80 |
81 |
273 |
--------------------------------------------------------------------------------
/src/sites/mteam.js:
--------------------------------------------------------------------------------
1 | import { _iframe_switch, _iframe_url } from '../stores'
2 | export { CONFIG as config };
3 | const CONFIG = {
4 | /** 默认的种子表格 dom selector */
5 | torrentListTable: "table.torrents",
6 |
7 | /** 将 种子列表dom 的信息变为 json对象列表 */
8 | TORRENT_LIST_TO_JSON,
9 |
10 | /** 加载图片等待时的默认图片 */
11 | LOADING_PIC: "logo.png",
12 |
13 | /**如果站点有自定义的icon, 可以用自定义的 */
14 | ICON: {},
15 |
16 | /**如果站点有必要设置分类颜色, 可以用自定义的 */
17 | CATEGORY: {
18 | // 成人分类
19 | 410: '#f52bcb', // 有码 HD
20 | 429: '#f52bcb', // 无码 HD
21 | 424: '#db55a9', // 有码 Xvid
22 | 430: '#db55a9', // 无码 Xvid
23 | 437: '#f77afa', // 有码 DVD
24 | 426: '#f77afa', // 无码 DVD
25 | 431: '#19a7ec', // 有码 BluRay
26 | 432: '#19a7ec', // 无码 BluRay
27 | 440: '#f52bcb', // GAY
28 | 436: '#bb1e9a', // 0 day
29 | 425: '#bb1e9a', // 写真 video
30 | 433: '#bb1e9a', // 写真 pic
31 | 411: '#f49800', // H-Game
32 | 412: '#f49800', // H-Anime
33 | 413: '#f49800', // H-Comic
34 |
35 | // 综合分类
36 | 401: '#c74854', // Movie SD
37 | 419: '#c01a20', // Movie HD
38 | 420: '#c74854', // Movie DVD
39 | 421: '#00a0e9', // Movie BluRay
40 | 439: '#1b2a51', // Movie Remux
41 | 403: '#c74854', // TV SD
42 | 402: '#276fb8', // TV HD
43 | 435: '#4dbebd ', // TV DVD
44 | 438: '#1897d6', // TV BluRay
45 | 404: '#23ac38', // 纪录教育
46 | 405: '#996c34', // Anime
47 | 407: '#23ac38', // Sport
48 | 422: '#f39800', // Software
49 | 423: '#f39800', // Game
50 | 427: '#f39800', // EBook
51 | 409: '#996c34', // Other
52 |
53 | // 音乐分类
54 | 406: '#8a57a1', // MV
55 | 408: '#8a57a1', // Music AAC/ALAC
56 | 434: '#8a57a1', // Music 无损
57 | },
58 |
59 | /** 索引 */
60 | INDEX: 0,
61 |
62 | /** iframe 宽度 */
63 | Iframe_Width: 1260,
64 |
65 | /** NOTE: 站点特殊操作 */
66 | special: function () {
67 | table_Iframe_Set();
68 | },
69 |
70 | /** NOTE: 站点下一页加载后操作 */
71 | pageLoaded: function () {
72 | table_Iframe_Set();
73 | }
74 | };
75 |
76 | /** 原表格点击图片显示 iframe */
77 | function table_Iframe_Set() {
78 | const lists = Array.from(document.querySelectorAll('td.torrentimg a'))
79 | lists.forEach(el => el.addEventListener('click', function (event) {
80 | // 阻止 a 标签的默认行为
81 | event.preventDefault();
82 |
83 | // 对 iframe 进行操作
84 | _iframe_switch.set(1)
85 | _iframe_url.set(el.href + "#kdescr")
86 | }))
87 | }
88 |
89 | /**
90 | * 将 种子列表dom 的信息变为 json对象列表
91 | * @param {DOM} torrent_list_Dom 种子列表dom
92 | * @param {*} CARD 卡片对象
93 | * @returns {list} 种子列表信息的 json对象列表
94 | */
95 | function TORRENT_LIST_TO_JSON(torrent_list_Dom) {
96 | // 获取表格中的所有行
97 | const rows = torrent_list_Dom.querySelectorAll("tbody tr");
98 | // const rows = torrent_list_Dom.querySelectorAll("tr");
99 | // const rows = div.querySelectorAll('tr');
100 |
101 | // 种子信息 -> 存储所有行数据的数组
102 | const data = [];
103 |
104 | // 遍历每一行并提取数据
105 | rows.forEach((row) => {
106 | // 获取种子分类
107 | const categoryImg = row.querySelector("td:nth-child(1) > a > img");
108 | const category = categoryImg ? categoryImg.title : "";
109 | // 若没有分类则退出
110 | if (!category) return;
111 |
112 | // 获取种子分类链接 / 分类号
113 | const categoryLinkDOM = categoryImg.parentNode;
114 | const categoryLink = categoryLinkDOM.href;
115 | const categoryNumber = categoryLink.slice(-3);
116 | // const _categoryImg = categoryImg.cloneNode(true)
117 | // _categoryImg.className = "card-category-img"
118 | const str = categoryImg.style.backgroundImage
119 | const regex = /url\("(.*)"\)/; // 匹配包含在双引号中的内容
120 | const result = str.match(regex); // 使用正则表达式匹配结果
121 | const _categoryImg = (result && result.length > 1) ? result[1] : null;
122 |
123 | // console.log(categoryLinkDOM);
124 | // console.log(categoryLink, categoryNumber);
125 |
126 | // 加index
127 | const torrentIndex = CONFIG.INDEX++;
128 |
129 | // 获取种子名称
130 | const torrentNameLink = row.querySelector(".torrentname a");
131 | const torrentName = torrentNameLink ? torrentNameLink.title.trim() : "";
132 |
133 | // 获取种子详情链接
134 | const torrentLink = torrentNameLink.href;
135 | // console.log(torrentLink);
136 |
137 | // 获取种子id
138 | const pattern = /id=(\d+)&hit/;
139 | const match = torrentLink.match(pattern);
140 | const torrentId = match ? parseInt(match[1]) : null;
141 |
142 | // 获取 mouse_over 和 mouse_out
143 | const imgDom = row.querySelector(".torrentname img");
144 | const _mouseOver = imgDom.getAttribute("onmouseover");
145 | // const _mouseOut = imgDom.getAttribute("onmouseout");
146 | // console.log(_mouseOver);
147 |
148 | // 获取预览图片链接
149 | const raw1 = _mouseOver ? _mouseOver.split(',')[2].toString() : '';
150 | const picLink = raw1 ? raw1.slice(raw1.indexOf("'") + 1, raw1.lastIndexOf("'")) : '/pic/nopic.jpg'
151 |
152 | // 获取描述
153 | const desCell = row.querySelector(".torrentname td:nth-child(2)");
154 | const length = desCell.childNodes.length - 1;
155 | const desDom = desCell.childNodes[length];
156 | const description = desDom.nodeName == '#text' ? desDom.textContent.trim() : "";
157 |
158 | // 获取置顶信息
159 | const place_at_the_top = row.querySelectorAll(".torrentname img.sticky");
160 | const pattMsg = place_at_the_top[0] ? place_at_the_top[0].title : "";
161 |
162 | // 获取临时标签: 新 / 热门 等
163 | const tempTagDom = row.querySelectorAll('.torrentname font');
164 | // console.log(tempTagDom);
165 |
166 | // 获取免费折扣类型
167 | const freeTypeImg = row.querySelector('img[class^="pro_"]');
168 | // console.log(freeTypeImg);
169 | // if (freeTypeImg) { console.log(freeTypeImg.alt); }
170 | const freeType = freeTypeImg
171 | ? "_" + freeTypeImg.alt.replace(/\s+/g, "")
172 | : "";
173 |
174 | // 获取免费剩余时间
175 | const freeRemainingTimeSpan = row.querySelector(".torrentname td:nth-child(2) span");
176 | const freeRemainingTime = freeRemainingTimeSpan
177 | ? freeRemainingTimeSpan.innerText
178 | : "";
179 |
180 | // 获取标签
181 | const tagSpans = row.querySelectorAll(".torrentname img[class^='label_']");
182 | // const raw_tags = row.querySelector(".torrentname");
183 | const tagsDOM = Array.from(tagSpans);
184 | let tags = tagSpans ? tagsDOM.map((el) => el.title.trim()) : [];
185 | const raw_tags = tagsDOM.map((el) => el.outerHTML).join(" ");
186 | // console.log(raw_tags);
187 |
188 | // 获取下载链接
189 | const downloadLink = `download.php?id=${torrentId}`;
190 |
191 | // 获取收藏链接
192 | const collectLink = `javascript: bookmark(${torrentId},${torrentIndex});`;
193 | // 获取收藏状态
194 | const collectDOM = row.querySelector(".torrentname a[id^='bookmark']");
195 | const collectState = collectDOM.children[0].alt;
196 | // console.log(collectState);
197 |
198 | // 获取评论数量
199 | const commentsLink = row.querySelector("td.rowfollow:nth-child(3) a");
200 | // console.log(commentsLink.innerHTML);
201 | const comments = commentsLink ? parseInt(commentsLink.textContent) : 0;
202 |
203 | // 获取上传日期
204 | const uploadDateSpan = row.querySelector("td:nth-child(4) span");
205 | const uploadDate = uploadDateSpan ? uploadDateSpan.title : "";
206 |
207 | // 获取文件大小
208 | const sizeCell = row.querySelector("td:nth-child(5)");
209 | const size = sizeCell ? sizeCell.textContent.trim() : "";
210 |
211 | // 获取做种人数
212 | const seedersLink = row.querySelector("td:nth-child(6) a");
213 | const seeders = seedersLink ? parseInt(seedersLink.textContent) : 0;
214 |
215 | // 获取下载人数
216 | const leechersCell = row.querySelector("td:nth-child(7)");
217 | const leechers = leechersCell ? parseInt(leechersCell.textContent) : 0;
218 |
219 | // 获取完成下载数
220 | const snatchedLink = row.querySelector("td:nth-child(8) a");
221 | const snatched = snatchedLink ? parseInt(snatchedLink.textContent) : 0;
222 |
223 | // 将当前行的数据格式化为 JSON 对象
224 | const rowData = {
225 | torrentIndex,
226 | _categoryImg,
227 | category,
228 | categoryLink,
229 | categoryNumber,
230 | torrent_name: torrentName,
231 | torrentLink,
232 | torrentId,
233 | picLink,
234 | place_at_the_top,
235 | pattMsg,
236 | downloadLink,
237 | collectLink,
238 | collectState,
239 | tempTagDom,
240 | freeTypeImg,
241 | free_type: freeType,
242 | free_remaining_time: freeRemainingTime,
243 | raw_tags,
244 | tagsDOM,
245 | tags,
246 | description,
247 | comments,
248 | upload_date: uploadDate,
249 | size,
250 | seeders,
251 | leechers,
252 | snatched,
253 | };
254 |
255 | // 将当前行的 JSON 对象添加到数组中
256 | data.push(rowData);
257 | });
258 | return data;
259 | }
--------------------------------------------------------------------------------
/src/sites/kamept.js:
--------------------------------------------------------------------------------
1 | import { _iframe_switch, _iframe_url } from '../stores'
2 | export { CONFIG as config };
3 | const CONFIG = {
4 | /** 默认的种子表格 dom selector */
5 | torrentListTable: "table.torrents",
6 |
7 | /** 将 种子列表dom 的信息变为 json对象列表 */
8 | TORRENT_LIST_TO_JSON,
9 |
10 | /** 加载图片等待时的默认图片 */
11 | LOADING_PIC: "pic/logo2_100.png",
12 |
13 | /** 如果站点有自定义的icon, 可以用自定义的 */
14 | ICON: {},
15 |
16 | /** 如果站点有必要设置分类颜色, 可以用自定义的 */
17 | CATEGORY: {
18 | // [粉色]AV: 同人AV 男娘 VR同人
19 | 410: '#FF66FF',
20 | 413: '#FF66FF',
21 | 414: '#FF66FF',
22 | // [绿色]图: cos图 画师CG 游戏CG 单行本 同人志
23 | 417: '#59CD90',
24 | 433: '#59CD90',
25 | 434: '#59CD90',
26 | 424: '#59CD90',
27 | 435: '#59CD90',
28 | // [黄色]动画: 里番 2D 3D
29 | 411: '#FAC05E',
30 | 419: '#FAC05E',
31 | 423: '#FAC05E',
32 | // [紫色]声音: 外语音声 中文音声 视频音声 音乐
33 | 420: '#3FA7D6',
34 | 421: '#3FA7D6',
35 | 422: '#3FA7D6',
36 | 437: '#3FA7D6',
37 | // [红色]游戏: 游戏 中文游戏
38 | 415: '#EE6352',
39 | 418: '#EE6352',
40 |
41 | },
42 | /** 索引 */
43 | INDEX: 0,
44 |
45 | /** iframe 宽度 */
46 | Iframe_Width: 1260,
47 |
48 | /** NOTE: 站点特殊操作 */
49 | special: function () {
50 | // 给龟站的搜索箱默认设置为"不扩展", 否则平常占地方(from tg by LNN)
51 | // $('ksearchboxmain').style.display = 'none'
52 | // @ts-ignore
53 | $('ksearchboxmain') ? $('ksearchboxmain').style.display = 'none' : null;
54 |
55 | // "点此查看即将断种资源" 文字设置为黑色(from tg by LNN)
56 | const link = document.querySelector('a[href="?sort=7&type=asc&seeders_begin=1"]');
57 | // @ts-ignore
58 | link ? link.childNodes[0].style.color = 'black' : null;
59 |
60 |
61 | // 让勋章不被卡片遮盖
62 | let np = document.querySelector('img#nexus-preview');
63 | if (np)
64 | np.style.zIndex = 12000;
65 | // -------------------------------
66 |
67 | // 原表格点击图片显示 iframe
68 | table_Iframe_Set()
69 | },
70 |
71 | /** NOTE: 站点下一页加载后操作 */
72 | pageLoaded: function () {
73 | // 原生 nexus tools
74 | var script = document.createElement("script");
75 | script.src = "https://kamept.com/js/nexus.js";
76 | document.head.appendChild(script);
77 |
78 | // -------------------------------
79 |
80 | // 原表格点击图片显示 iframe
81 | table_Iframe_Set()
82 | }
83 | };
84 |
85 | /** 原表格点击图片显示 iframe */
86 | function table_Iframe_Set() {
87 | const lists = Array.from(document.querySelectorAll('.torrentname'))
88 | lists.forEach(el => el.addEventListener('click', function (event) {
89 | // 阻止 a 标签的默认行为
90 | event.preventDefault();
91 |
92 | // 对 iframe 进行操作
93 | _iframe_switch.set(1)
94 |
95 | // console.log(el.children[0].children[0].children[1].querySelector('a').href);
96 | _iframe_url.set(el.children[0].children[0].children[1].querySelector('a').href + "#kdescr")
97 | }))
98 | }
99 |
100 | /** 将 种子列表dom 的信息变为 json对象列表
101 | * @param {*} torrent_list_Dom 种子列表dom
102 | * @returns {[]} 种子列表信息的 json对象列表
103 | */
104 | function TORRENT_LIST_TO_JSON(torrent_list_Dom) {
105 | // 获取表格中的所有行
106 | const rows = torrent_list_Dom.querySelectorAll("tbody tr");
107 | // const rows = torrent_list_Dom.querySelectorAll("tr");
108 | // const rows = div.querySelectorAll('tr');
109 |
110 | // 种子信息 -> 存储所有行数据的数组
111 | const data = [];
112 |
113 | // 遍历每一行并提取数据
114 | rows.forEach((row) => {
115 | // 获取种子分类
116 | const categoryImg = row.querySelector("td:nth-child(1) > a > img");
117 | const category = categoryImg ? categoryImg.alt : "";
118 | // 若没有分类则退出
119 | if (!category) return;
120 |
121 | // 获取种子分类链接 / 分类号
122 | const categoryLinkDOM = categoryImg.parentNode;
123 | const categoryLink = categoryLinkDOM.href;
124 | const categoryNumber = categoryLink.slice(-3);
125 | const _categoryImg = categoryImg.cloneNode(true)
126 | _categoryImg.className = "card-category-img"
127 | // console.log(categoryLinkDOM);
128 | // console.log(categoryLink, categoryNumber);
129 |
130 | // 加index
131 | // const torrentIndex = CARD.CARD_INDEX++;
132 | const torrentIndex = CONFIG.INDEX++;
133 |
134 | // 获取种子名称
135 | const torrentNameLink = row.querySelector(".torrentname a");
136 | const torrentName = torrentNameLink ? torrentNameLink.textContent.trim() : "";
137 |
138 | // 获取种子详情链接
139 | const torrentLink = torrentNameLink.href;
140 | // console.log(torrentLink);
141 |
142 | // 获取种子id
143 | const pattern = /id=(\d+)&hit/;
144 | const match = torrentLink.match(pattern);
145 | const torrentId = match ? parseInt(match[1]) : null;
146 |
147 | // 获取预览图片链接
148 | const picLink = row.querySelector(".torrentname img").getAttribute("data-src");
149 |
150 | // 获取描述
151 | const desCell = row.querySelector(".torrentname td:nth-child(2)");
152 | const length = desCell.childNodes.length - 1;
153 | const desDom = desCell.childNodes[length];
154 | const description = desDom.nodeName == '#text' ? desDom.textContent.trim() : "";
155 |
156 | // 获取置顶信息
157 | const place_at_the_top = row.querySelectorAll(".torrentname img.sticky");
158 | const pattMsg = place_at_the_top[0] ? place_at_the_top[0].title : "";
159 |
160 | // 获取临时标签: 新 / 热门 等
161 | const tempTagDom = Array.from(row.querySelectorAll('.torrentname font'));
162 | // console.log(tempTagDom);
163 |
164 | // 获取免费折扣类型
165 | const freeTypeImg = row.querySelector('img[class^="pro_"]');
166 | // console.log(freeTypeImg);
167 | // console.log(freeTypeImg.alt);
168 | const freeType = freeTypeImg
169 | ? "_" + freeTypeImg.alt.replace(/\s+/g, "")
170 | : "";
171 |
172 | // 获取免费剩余时间
173 | // const freeRemainingTimeSpan = row.querySelector("font");
174 | const freeRemainingTimeSpan = freeType ? tempTagDom.pop() : "";
175 | const freeRemainingTime = freeRemainingTimeSpan
176 | ? freeRemainingTimeSpan.innerText
177 | : "";
178 |
179 | // 获取标签
180 | const tagSpans = row.querySelectorAll(".torrentname span");
181 | // const raw_tags = row.querySelector(".torrentname");
182 | const tagsDOM = Array.from(tagSpans);
183 | let tags = tagSpans ? tagsDOM.map((span) => span.textContent.trim()) : [];
184 |
185 | // console.log(index);
186 | // console.log(torrentName);
187 | // console.log(tags);
188 |
189 | if (freeRemainingTime != "") {
190 | // console.log(tags[0]);
191 | tags.shift();
192 | tagsDOM.shift();
193 | }
194 | const raw_tags = tagsDOM.map((el) => el.outerHTML).join("");
195 | // console.log(raw_tags);
196 |
197 | // 获取下载链接
198 | const downloadLink = `download.php?id=${torrentId}`;
199 |
200 | // 获取收藏链接
201 | const collectLink = `javascript: bookmark(${torrentId},${torrentIndex});`;
202 | // 获取收藏状态
203 | const collectDOM = row.querySelector(".torrentname a[id^='bookmark']");
204 | const collectState = collectDOM.children[0].alt;
205 | // console.log(collectState);
206 |
207 | // 获取评论数量
208 | const commentsLink = row.querySelector("td.rowfollow:nth-child(3) a");
209 | // console.log(commentsLink.innerHTML);
210 | const comments = commentsLink ? parseInt(commentsLink.textContent) : 0;
211 |
212 | // 获取上传日期
213 | const uploadDateSpan = row.querySelector("td:nth-child(4) span");
214 | const uploadDate = uploadDateSpan ? uploadDateSpan.title : "";
215 |
216 | // 获取文件大小
217 | const sizeCell = row.querySelector("td:nth-child(5)");
218 | const size = sizeCell ? sizeCell.textContent.trim() : "";
219 |
220 | // 获取做种人数
221 | const seedersLink = row.querySelector("td:nth-child(6) a");
222 | const seeders = seedersLink ? parseInt(seedersLink.textContent) : 0;
223 |
224 | // 获取下载人数
225 | const leechersCell = row.querySelector("td:nth-child(7)");
226 | const leechers = leechersCell ? parseInt(leechersCell.textContent) : 0;
227 |
228 | // 获取完成下载数
229 | const snatchedLink = row.querySelector("td:nth-child(8) a");
230 | const snatched = snatchedLink ? parseInt(snatchedLink.textContent) : 0;
231 |
232 | // 将当前行的数据格式化为 JSON 对象
233 | const rowData = {
234 | torrentIndex,
235 | _categoryImg,
236 | category,
237 | categoryLink,
238 | categoryNumber,
239 | torrent_name: torrentName,
240 | torrentLink,
241 | torrentId,
242 | picLink,
243 | place_at_the_top,
244 | pattMsg,
245 | downloadLink,
246 | collectLink,
247 | collectState,
248 | tempTagDom,
249 | freeTypeImg,
250 | free_type: freeType,
251 | free_remaining_time: freeRemainingTime,
252 | raw_tags,
253 | tagsDOM,
254 | tags,
255 | description,
256 | upload_date: uploadDate,
257 | comments,
258 | size,
259 | seeders,
260 | leechers,
261 | snatched,
262 | };
263 |
264 | // 将当前行的 JSON 对象添加到数组中
265 | data.push(rowData);
266 | });
267 | // @ts-ignore
268 | return data;
269 | }
--------------------------------------------------------------------------------
/src/sites/_index.svelte:
--------------------------------------------------------------------------------
1 |
336 |
337 |
338 | {#if $_current_domain == "kamept.com"}
339 | {#each infoList as info (info.torrentIndex)}
340 |
341 | {/each}
342 | {:else if $_current_domain == "kp.m-team.cc"}
343 | {#each infoList as info (info.torrentIndex)}
344 |
345 | {/each}
346 | {:else}
347 | else
348 | {/if}
349 |
350 |
351 |
352 |
365 |
366 |
367 |
380 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 全局工具类函数~
3 | */
4 |
5 | import { get } from 'svelte/store'
6 | import { _show_nexus_pic, _delay_nexus_pic } from '../stores'
7 |
8 | export { debounce, throttle, sortMasonry, NEXUS_TOOLS }
9 | /**瀑布流执行次数 */
10 | const _SORT_COUNT = {
11 | /**外部呼叫函数次数 */
12 | Call: 0,
13 | /**函数实际执行次数 */
14 | Run: 0,
15 | }
16 | // NOTE: 1. 抽象工具-------------------------------
17 | /** 防抖函数
18 | * @param {function} func 操作函数
19 | * @param {number} delay 延迟
20 | * @returns
21 | */
22 | let timer = null;
23 | function debounce(func, delay) {
24 | return function () {
25 | if (timer) {
26 | console.warn('debounce dupe!!!!!!');
27 | clearTimeout(timer);
28 | }
29 | timer = setTimeout(function () {
30 | func.apply(this, arguments);
31 | // console.log('防抖: ', func.name);
32 | timer = null;
33 | }, delay);
34 | };
35 | }
36 |
37 | /** 节流函数
38 | * @param {*} func 操作函数
39 | * @param {*} delay 延迟
40 | * @returns
41 | */
42 | function throttle(func, delay) {
43 | let timerId;
44 | let lastExecTime = 0;
45 |
46 | return function (...args) {
47 | const currentTime = Date.now();
48 | const elapsedTime = currentTime - lastExecTime;
49 |
50 | if (!timerId && elapsedTime > delay) {
51 | func.apply(this, args);
52 | lastExecTime = currentTime;
53 | } else {
54 | clearTimeout(timerId);
55 | timerId = setTimeout(() => {
56 | func.apply(this, args);
57 | lastExecTime = currentTime;
58 | timerId = null;
59 | }, delay - elapsedTime);
60 | }
61 | };
62 | }
63 |
64 | // NOTE: 2. 瀑布流整理调用-------------------------------
65 | /**设置节流 Masonry 执行体*/
66 | const throttleSort = throttle(doSortMasonry, 1500);
67 | const throttleSort_fast = throttle(doSortMasonry, 30);
68 |
69 | /**实际执行整理 Masonry */
70 | function doSortMasonry() {
71 | _SORT_COUNT.Run++
72 | // console.log(`实际执行次数: ${_time}`);
73 | console.log(`呼叫整理次数: ${_SORT_COUNT.Call} 实际整理次数: ${_SORT_COUNT.Run}`);
74 | masonry.layout()
75 | }
76 |
77 | /**外部呼叫整理 Masonry: 根据速度调整 */
78 | function sortMasonry(speed = 'normal') {
79 | _SORT_COUNT.Call++
80 | if (masonry) {
81 | if (speed === 'fast') {
82 | throttleSort_fast()
83 | } else {
84 | throttleSort()
85 | }
86 | }
87 | }
88 |
89 | // NOTE: 3. Nexus 工具(触摸预览 + 懒加载)-------------------------------/**NEXUS 预览工具箱, 提供图片预览和图片懒加载, 神器*/
90 | /**NEXUS 预览工具箱, 提供图片预览和图片懒加载, 神器*/
91 | function NEXUS_TOOLS() {
92 | console.log('------------------------NEXUS TOOLS------------------------');
93 | jQuery(document).ready(function () {
94 | // console.log("----jQuery 加载完毕 | Kesa 改版 nexus 工具启动!---");
95 |
96 | /**
97 | * 获取图片位置
98 | * @param {*} event 鼠标事件对象
99 | * @param {*} imgEle 图片元素对象
100 | * @returns
101 | */
102 | function getImgPosition(event, imgEle) {
103 | // console.log(e, imgEle)
104 |
105 | // 获取图片的原始宽度和高度
106 | let imgWidth = imgEle.prop("naturalWidth");
107 | let imgHeight = imgEle.prop("naturalHeight");
108 |
109 | // 计算图片的宽高比
110 | let ratio = imgWidth / imgHeight;
111 |
112 | // 设置图片的偏移量, 初始为 10
113 | let offsetX = 0;
114 | let offsetY = 0;
115 |
116 | // 设置为预览图片默认 or 预览图片尽可能占满屏幕
117 | if (true) {
118 | }
119 |
120 | // 计算图片应该显示的宽度和高度,初始值为窗口的宽度和高度减去鼠标事件对象的坐标。
121 | let width = window.innerWidth - event.clientX;
122 | let height = window.innerHeight - event.clientY;
123 |
124 | // 设置偏移量是否需要改变的标记,初始值为 0 和 false。
125 | let changeOffsetY = 0;
126 | let changeOffsetX = false;
127 |
128 | // 如果鼠标位置在窗口的右半边且图片的右侧会超出窗口边界,
129 | // 就将偏移量需要改变的标记设置为 true,
130 | // 并将图片的宽度调整为鼠标事件对象的横坐标。
131 | if (event.clientX > window.innerWidth / 2 && event.clientX + imgWidth > window.innerWidth) {
132 | changeOffsetX = true;
133 | width = event.clientX;
134 | }
135 |
136 | // 如果鼠标位置在窗口的下半边,且图片的下侧会超出窗口边界,
137 | // 就将偏移量需要改变的标记设置为 1 或 2,并将图片的高度调整为鼠标事件对象的纵坐标。
138 | if (event.clientY > window.innerHeight / 2) {
139 | if (event.clientY + imgHeight / 2 > window.innerHeight) {
140 | changeOffsetY = 1;
141 | height = event.clientY;
142 | } else if (event.clientY + imgHeight > window.innerHeight) {
143 | changeOffsetY = 2;
144 | height = event.clientY;
145 | }
146 | }
147 |
148 | // let log = `innerWidth: ${window.innerWidth}, innerHeight: ${window.innerHeight}, pageX: ${event.pageX}, pageY: ${event.pageY}, imgWidth: ${imgWidth}, imgHeight: ${imgHeight}, width: ${width}, height: ${height}, offsetX: ${offsetX}, offsetY: ${offsetY}, changeOffsetX: ${changeOffsetX}, changeOffsetY: ${changeOffsetY}`;
149 | // console.log(log);
150 |
151 | // 如果图片的宽度大于应该显示的宽度,
152 | // 就将图片的宽度调整为应该显示的宽度,
153 | // 并根据宽高比计算出新的高度。
154 | if (imgWidth > width) {
155 | imgWidth = width;
156 | imgHeight = imgWidth / ratio;
157 | }
158 |
159 | // 如果图片的高度大于应该显示的高度,
160 | // 就将图片的高度调整为应该显示的高度,
161 | // 并根据宽高比计算出新的宽度。
162 | if (imgHeight > height) {
163 | imgHeight = height;
164 | imgWidth = imgHeight * ratio;
165 | }
166 |
167 | // 如果偏移量需要改变,
168 | // 就将偏移量设置为鼠标事件对象横坐标和应该显示的宽度之差再加上 10 的负值。
169 | if (changeOffsetX) {
170 | // console.log('X轴反转');
171 | offsetX = -imgWidth;
172 | }
173 |
174 | // 如果偏移量需要改变,且需要向上偏移,
175 | // 则将偏移量设置为图片的高度减去窗口剩余的高度和鼠标事件对象纵坐标之差的负值;
176 | // 如果需要向上和向下偏移,则将偏移量设置为图片的高度的一半的负值。
177 | if (changeOffsetY == 1) {
178 | offsetY = -(imgHeight - (window.innerHeight - event.clientY));
179 | } else if (changeOffsetY == 2) {
180 | offsetY = -imgHeight / 2;
181 | }
182 |
183 | // if (changeOffsetX) { console.log(`imgWidth: ${imgWidth}, imgHeight: ${imgHeight}, offsetX: ${offsetX}, offsetY: ${offsetY}`); }
184 | // console.log(`changeOffsetY: ${changeOffsetY}`);
185 | // 返回对象
186 | return { imgWidth, imgHeight, offsetX, offsetY };
187 | }
188 |
189 | function getMinRatio(pic, container) {
190 | return Math.min(container.width / pic.width, container.height / pic.height)
191 | }
192 |
193 | /**
194 | * 获取图片位置_Kesa版
195 | * @param {*} event 鼠标事件对象
196 | * @param {*} imgEle 图片元素对象
197 | * @returns
198 | */
199 | function previewPosition_Kesa(event, imgEle) {
200 | // 获取图片的原始宽度和高度
201 | let imgWidth = imgEle.prop("naturalWidth") ?? 0;
202 | let imgHeight = imgEle.prop("naturalHeight") ?? 0;
203 |
204 |
205 | // 计算图片的宽高比
206 | let ratio = imgWidth / imgHeight;
207 |
208 | // 设置图片的偏移量, 初始为 10
209 | let offsetX = 0;
210 | let offsetY = 0;
211 |
212 | // 获取鼠标位置
213 | const mouseX = event.clientX;
214 | const mouseY = event.clientY;
215 | // 获取视口宽高
216 | const viewportWidth = window.innerWidth;
217 | const viewportHeight = window.innerHeight;
218 |
219 | // 定义视口缓冲距离
220 | const borderY = 10
221 | const borderX = 10
222 |
223 | // 获取鼠标位置到视口上下左右的距离
224 | const distanceToTop = mouseY;
225 | const distanceToBottom = viewportHeight - mouseY;
226 | const distanceToLeft = mouseX;
227 | const distanceToRight = viewportWidth - mouseX;
228 |
229 | // 定义size对象
230 | const picSize = {
231 | width: imgWidth,
232 | height: imgHeight
233 | }
234 | const containerSize = {
235 | bot: {
236 | width: viewportWidth,
237 | height: distanceToBottom,
238 | },
239 | top: {
240 | width: viewportWidth,
241 | height: distanceToTop,
242 | },
243 | right: {
244 | width: distanceToRight,
245 | height: viewportHeight,
246 | },
247 | left: {
248 | width: distanceToLeft,
249 | height: viewportHeight,
250 | },
251 | }
252 |
253 | /**定义可容纳最大比例 */
254 | let maxRatio = 0
255 | /**定义可容纳最大比例的位置 */
256 | let maxPosition = ''
257 |
258 | for (const key in containerSize) {
259 | if (Object.hasOwnProperty.call(containerSize, key)) {
260 | const element = containerSize[key];
261 | if (getMinRatio(picSize, element) > maxRatio) {
262 | maxRatio = getMinRatio(picSize, element)
263 | maxPosition = key
264 | }
265 | }
266 | }
267 |
268 | // console.log(`最大的位置: ${maxPosition}
269 | // top: ${getMinRatio(picSize, containerSize['top'])}
270 | // bot: ${getMinRatio(picSize, containerSize['bot'])}
271 | // left: ${getMinRatio(picSize, containerSize['left'])}
272 | // right: ${getMinRatio(picSize, containerSize['right'])}
273 | // `);
274 |
275 |
276 |
277 | const result = {
278 | top: {
279 | left: 0,
280 | top: 0,
281 | width: viewportWidth,
282 | height: distanceToTop,
283 | },
284 | bot: {
285 | left: 0,
286 | top: distanceToTop,
287 | width: viewportWidth,
288 | height: distanceToBottom,
289 | },
290 | left: {
291 | left: 0,
292 | top: 0,
293 | width: distanceToLeft,
294 | height: viewportHeight,
295 | },
296 | right: {
297 | left: distanceToLeft,
298 | top: 0,
299 | width: distanceToRight,
300 | height: viewportHeight,
301 | },
302 | default: {
303 | left: 0,
304 | top: 0,
305 | width: 0,
306 | height: 0,
307 | },
308 | }
309 |
310 | const container = maxPosition != '' ? result[maxPosition] : result['default']
311 | return container
312 |
313 | // console.log(
314 | // '2_Bottom:', distanceToBottom,
315 | // '2_Top:', distanceToTop,
316 | // '2_Left:', distanceToLeft,
317 | // '2_Right:', distanceToRight
318 | // )
319 |
320 | // return {
321 | // left: event.pageX + position.offsetX,
322 | // top: event.pageY + position.offsetY,
323 | // width: position.imgWidth,
324 | // height: position.imgHeight,
325 | // };
326 |
327 | }
328 |
329 | /**
330 | * 获取展示位置
331 | * @param {*} event
332 | * @param {*} position
333 | * @returns
334 | */
335 | function getPosition(event, position) {
336 | return {
337 | left: event.pageX + position.offsetX,
338 | top: event.pageY + position.offsetY,
339 | width: position.imgWidth,
340 | height: position.imgHeight,
341 | };
342 | }
343 |
344 | // -------------preview
345 | const selector = "img.preview_Kesa";
346 | let imgEle;
347 | let imgPosition;
348 |
349 | // 1. 原始方法: 判断是否有 #nexus-preview, 没有就新建一个
350 | if (!jQuery("#nexus-preview").length) {
351 | const _previewDom = document.body.appendChild(document.createElement('img'));
352 | _previewDom.id = 'nexus-preview';
353 | }
354 | const previewEle = jQuery("#nexus-preview");
355 |
356 | // 2. Kesa方法: 判断是否有 #kp_container, 没有就新建一个
357 | function createKesaPreview(color) {
358 | const parent =
359 | jQuery('', {
360 | id: 'kp_container',
361 | css: {
362 | backgroundColor: color,
363 | opacity: 1,
364 | position: 'fixed',
365 | zIndex: 20000,
366 | pointerEvents: 'none',
367 | transition: 'all .3s'
368 | }
369 | });
370 | parent.append(jQuery('
![]()
', {
371 | class: 'kp_img',
372 | css: {
373 | position: 'absolute',
374 | zIndex: 20002,
375 | pointerEvents: 'none',
376 | width: '100%',
377 | height: '100%',
378 | objectFit: 'contain',
379 | }
380 | }))
381 | parent.append(jQuery('
![]()
', {
382 | class: 'kp_img',
383 | css: {
384 | position: 'absolute',
385 | zIndex: 20001,
386 | pointerEvents: 'none',
387 | width: '100%',
388 | height: '100%',
389 | objectFit: 'cover',
390 | filter: `blur(8px)`
391 | }
392 | }))
393 | return parent
394 | }
395 |
396 | // const kesa_preview = createKesaPreview('')
397 | const kesa_preview = (jQuery('#kp_container').length > 0) ? jQuery('#kp_container') : createKesaPreview('')
398 | jQuery("body").append(kesa_preview)
399 |
400 | /** timer 用来搞延迟加载图片的 */
401 | let buffer = null;
402 | jQuery("body")
403 | .on("mouseover", selector, function (e) {
404 | imgEle = jQuery(this);
405 | // NOTE: 加一个延迟, 让突然划过去的指针不被大图干扰
406 | buffer = setTimeout(() => {
407 |
408 | // NOTE: 这里加了个判断是否开启触摸显示大图的 boolean
409 | if (get(_show_nexus_pic)) {
410 |
411 | imgPosition = getImgPosition(e, imgEle);
412 | let position = getPosition(e, imgPosition);
413 | let src = imgEle.attr("src");
414 | if (src) {
415 | // FIXME: 2选1: 渐变 or 直接出现消失
416 | // previewEle.attr("src", src).css(position).fadeIn("fast");
417 | if (kesa_preview) kesa_preview.find('.kp_img').attr('src', src)
418 | }
419 |
420 | // kesa_preview.css(previewPosition_Kesa(e, imgEle)).fadeIn('fast')
421 | kesa_preview.css(previewPosition_Kesa(e, imgEle)).show()
422 | }
423 | }, get(_delay_nexus_pic));
424 | })
425 | .on("mouseout", selector, function (e) {
426 | // FIXME: 2选1: 渐变 or 直接出现消失
427 | // previewEle.hide();// previewEle.fadeOut();
428 | kesa_preview.hide();// kesa_preview.fadeOut()
429 |
430 | if (buffer) clearTimeout(buffer)
431 | })
432 | .on("mousemove", selector, function (e) {
433 | imgPosition = getImgPosition(e, imgEle);
434 | let position = getPosition(e, imgPosition);
435 |
436 | // FIXME: 2选1: 渐变 or 直接出现消失
437 | // previewEle.css(position);
438 | kesa_preview.css(previewPosition_Kesa(e, imgEle))
439 | });
440 |
441 | // -------------lazy load
442 | if ("IntersectionObserver" in window) {
443 | let imgList = [...document.querySelectorAll(".nexus-lazy-load_Kesa")];
444 | // console.log(imgList);
445 | const io = new IntersectionObserver((entries) => {
446 | entries.forEach((entry) => {
447 | const el = entry.target;
448 | const intersectionRatio = entry.intersectionRatio;
449 | // el._entry = entry
450 | // console.log(`el, ${el.getAttribute("data-src")}, intersectionRatio: ${intersectionRatio}`);
451 |
452 | // if (
453 | // intersectionRatio > 0 &&
454 | // intersectionRatio <= 1 &&
455 | // !el.classList.contains("preview_Kesa")
456 | // )
457 | if (entry.isIntersecting && !el.classList.contains("preview_Kesa")
458 | ) {
459 | // 懒加载成功
460 | // console.log(`el, ${el.getAttribute("data-src")}, loadImg`);
461 | // let currentIndex = el.nextSibling.nextSibling.textContent.trim();
462 | // console.log(`index: ${currentIndex} 懒加载添加成功~`);
463 | // console.log(el);
464 | const source = el.dataset.src;
465 | el.src = source;
466 | el.classList.add("preview_Kesa");
467 | // 加载完图片后重新布局 Masonry
468 | // 这里是真实图片的加载
469 | // TODO: 这里可以写个防抖优化性能, 但是人好像自带防抖的, 哈哈......
470 | sortMasonry();
471 | }
472 | // el.onload = el.onerror = () => io.unobserve(el);
473 | });
474 | });
475 |
476 | imgList.forEach((img) => io.observe(img));
477 | }
478 | });
479 | }
--------------------------------------------------------------------------------
/src/sites/kamept.svelte:
--------------------------------------------------------------------------------
1 |
86 |
87 |
94 |
99 |
100 |
111 |
112 |
113 |
114 |
115 |
116 | {torrentInfo.category}
117 |
118 |
119 |
120 | {#if $_CARD_SHOW.title || _hover}
121 |
130 | {/if}
131 |
132 |
133 |
134 |
135 |

143 |
144 |
145 |
146 | {torrentInfo.torrentIndex + 1}
147 |
148 |
149 |
150 |
151 | {#if $_CARD_SHOW.all || _hover}
152 |
153 | {#if torrentInfo.free_type || torrentInfo.pattMsg}
154 |
155 |
156 |
157 | {#if torrentInfo.place_at_the_top.length != 0}
158 | {@html Array.from(torrentInfo.place_at_the_top).map(
159 | (e) => e.outerHTML
160 | ) + " "}
161 | {/if}
162 |
163 |
164 | {#if torrentInfo.freeTypeImg}
165 | {@html torrentInfo.freeTypeImg.outerHTML}
166 | {/if}
167 | {#if torrentInfo.free_remaining_time}
168 | {torrentInfo.free_remaining_time}
169 | {/if}
170 |
171 |
172 | {/if}
173 |
174 |
175 | {#if torrentInfo.description}
176 |
177 | {torrentInfo.description}
178 |
179 | {/if}
180 |
181 |
182 |
183 | {@html torrentInfo.tagsDOM
184 | .map((el) => {
185 | const _tag = document.createElement("div");
186 | _tag.innerHTML = el.outerHTML;
187 | // console.log(_tag);
188 | return _tag.outerHTML;
189 | })
190 | .join("")}
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 | {@html ICON.SIZE} {torrentInfo.size}
199 |
200 |
201 |
202 |
203 |
204 | {@html ICON.DOWNLOAD}
205 |
下载
206 |
207 |
208 |
209 |
210 |
211 |
212 |
220 | {@html torrentInfo.collectState == "Unbookmarked"
221 | ? ICON.COLLET
222 | : ICON.COLLETED}
223 | 收藏
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
上传时间: {torrentInfo.upload_date}
233 |
234 |
235 |
236 | {@html ICON.COMMENT} {torrentInfo.comments}
237 | {@html ICON.SEEDERS} {torrentInfo.seeders}
238 | {@html ICON.LEECHERS} {torrentInfo.leechers}
239 | {@html ICON.SNATCHED} {torrentInfo.snatched}
240 |
241 |
242 | {/if}
243 |
244 |
245 | {#if !($_CARD_SHOW.all || _hover)}
246 |
247 | {#if $_CARD_SHOW.free && (torrentInfo.free_type || torrentInfo.pattMsg)}
248 |
249 |
250 |
251 | {#if torrentInfo.place_at_the_top.length != 0}
252 | {@html Array.from(torrentInfo.place_at_the_top).map(
253 | (e) => e.outerHTML
254 | ) + " "}
255 | {/if}
256 |
257 |
258 | {#if torrentInfo.freeTypeImg}
259 | {@html torrentInfo.freeTypeImg.outerHTML}
260 | {/if}
261 | {#if torrentInfo.free_remaining_time}
262 | {torrentInfo.free_remaining_time}
263 | {/if}
264 |
265 |
266 | {/if}
267 |
268 |
269 | {#if $_CARD_SHOW.sub_title && torrentInfo.description}
270 |
271 | {torrentInfo.description}
272 |
273 | {/if}
274 |
275 |
276 | {#if $_CARD_SHOW.tags}
277 |
278 | {@html torrentInfo.tagsDOM
279 | .map((el) => {
280 | const _tag = document.createElement("div");
281 | _tag.innerHTML = el.outerHTML;
282 | // console.log(_tag);
283 | return _tag.outerHTML;
284 | })
285 | .join("")}
286 |
287 | {/if}
288 |
289 |
290 |
291 | {#if $_CARD_SHOW.size_download_collect}
292 |
293 |
294 |
295 | {@html ICON.SIZE} {torrentInfo.size}
296 |
297 |
298 |
299 |
300 |
301 | {@html ICON.DOWNLOAD}
302 |
下载
303 |
304 |
305 |
306 |
307 |
308 |
309 |
317 | {@html torrentInfo.collectState == "Unbookmarked"
318 | ? ICON.COLLET
319 | : ICON.COLLETED}
320 | 收藏
321 |
322 |
323 |
324 | {/if}
325 |
326 |
327 |
328 |
329 |
330 | {#if $_CARD_SHOW.upload_time}
331 |
332 | 上传时间:
333 | {torrentInfo.upload_date}
334 |
335 | {/if}
336 |
337 |
338 | {#if $_CARD_SHOW.statistics}
339 |
340 | {@html ICON.COMMENT} {torrentInfo.comments}
341 | {@html ICON.SEEDERS} {torrentInfo.seeders}
342 | {@html ICON.LEECHERS} {torrentInfo.leechers}
343 | {@html ICON.SNATCHED} {torrentInfo.snatched}
344 |
345 | {/if}
346 |
347 | {/if}
348 |
349 |
350 |
351 |
564 |
--------------------------------------------------------------------------------
/src/sites/mteam.svelte:
--------------------------------------------------------------------------------
1 |
87 |
88 |
98 |
103 |
104 |
115 |
116 |

117 |
118 | {torrentInfo.category}
119 |
120 |
121 |
122 | {#if $_CARD_SHOW.title || _hover}
123 |
134 | {/if}
135 |
136 |
137 |
138 |
139 |

147 |
148 |
149 |
150 | {torrentInfo.torrentIndex + 1}
151 |
152 |
153 |
154 |
155 | {#if $_CARD_SHOW.all || _hover}
156 |
157 | {#if torrentInfo.free_type || torrentInfo.pattMsg}
158 |
159 |
160 |
161 | {#if torrentInfo.place_at_the_top.length != 0}
162 | {@html Array.from(torrentInfo.place_at_the_top).map(
163 | (e) => e.outerHTML
164 | ) + " "}
165 | {/if}
166 |
167 |
168 | {#if torrentInfo.freeTypeImg}
169 | {@html torrentInfo.freeTypeImg.outerHTML}
170 | {/if}
171 | {#if torrentInfo.free_remaining_time}
172 | {torrentInfo.free_remaining_time}
173 | {/if}
174 |
175 |
176 | {/if}
177 |
178 |
179 | {#if torrentInfo.description}
180 |
181 | {torrentInfo.description}
182 |
183 | {/if}
184 |
185 |
186 |
187 | {@html torrentInfo.tagsDOM
188 | .map((el) => {
189 | const _tag = document.createElement("div");
190 | _tag.innerHTML = el.outerHTML;
191 | // console.log(_tag);
192 | return _tag.outerHTML;
193 | })
194 | .join("")}
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 | {@html ICON.SIZE} {torrentInfo.size}
203 |
204 |
205 |
206 |
207 |
208 | {@html ICON.DOWNLOAD}
209 |
下载
210 |
211 |
212 |
213 |
214 |
215 |
216 |
224 | {@html torrentInfo.collectState == "Unbookmarked"
225 | ? ICON.COLLET
226 | : ICON.COLLETED}
227 | 收藏
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 | 上传时间:
238 | {torrentInfo.upload_date}
239 |
240 |
241 |
242 |
243 | {@html ICON.COMMENT} {torrentInfo.comments}
244 | {@html ICON.SEEDERS} {torrentInfo.seeders}
245 | {@html ICON.LEECHERS} {torrentInfo.leechers}
246 | {@html ICON.SNATCHED} {torrentInfo.snatched}
247 |
248 |
249 | {/if}
250 |
251 |
252 | {#if !($_CARD_SHOW.all || _hover)}
253 |
254 | {#if $_CARD_SHOW.free && (torrentInfo.free_type || torrentInfo.pattMsg)}
255 |
256 |
257 |
258 | {#if torrentInfo.place_at_the_top.length != 0}
259 | {@html Array.from(torrentInfo.place_at_the_top).map(
260 | (e) => e.outerHTML
261 | ) + " "}
262 | {/if}
263 |
264 |
265 | {#if torrentInfo.freeTypeImg}
266 | {@html torrentInfo.freeTypeImg.outerHTML}
267 | {/if}
268 | {#if torrentInfo.free_remaining_time}
269 | {torrentInfo.free_remaining_time}
270 | {/if}
271 |
272 |
273 | {/if}
274 |
275 |
276 | {#if $_CARD_SHOW.sub_title && torrentInfo.description}
277 |
278 | {torrentInfo.description}
279 |
280 | {/if}
281 |
282 |
283 | {#if $_CARD_SHOW.tags && torrentInfo.tagsDOM.length != 0}
284 |
285 | {@html torrentInfo.tagsDOM
286 | .map((el) => {
287 | const _tag = document.createElement("div");
288 | _tag.innerHTML = el.outerHTML;
289 | // console.log(_tag);
290 | return _tag.outerHTML;
291 | })
292 | .join("")}
293 |
294 | {/if}
295 |
296 |
297 |
298 | {#if $_CARD_SHOW.size_download_collect}
299 |
300 |
301 |
302 | {@html ICON.SIZE} {torrentInfo.size}
303 |
304 |
305 |
306 |
307 |
308 | {@html ICON.DOWNLOAD}
309 |
下载
310 |
311 |
312 |
313 |
314 |
315 |
316 |
324 | {@html torrentInfo.collectState == "Unbookmarked"
325 | ? ICON.COLLET
326 | : ICON.COLLETED}
327 | 收藏
328 |
329 |
330 |
331 | {/if}
332 |
333 |
334 |
335 |
336 |
337 | {#if $_CARD_SHOW.upload_time}
338 |
339 | 上传时间:
340 | {torrentInfo.upload_date}
341 |
342 | {/if}
343 |
344 |
345 | {#if $_CARD_SHOW.statistics}
346 |
347 | {@html ICON.COMMENT} {torrentInfo.comments}
348 | {@html ICON.SEEDERS} {torrentInfo.seeders}
349 | {@html ICON.LEECHERS} {torrentInfo.leechers}
350 | {@html ICON.SNATCHED} {torrentInfo.snatched}
351 |
352 | {/if}
353 |
354 | {/if}
355 |
356 |
357 |
358 |
586 |
--------------------------------------------------------------------------------
/pnpm-lock.yaml:
--------------------------------------------------------------------------------
1 | lockfileVersion: '6.0'
2 |
3 | devDependencies:
4 | '@sveltejs/vite-plugin-svelte':
5 | specifier: 2.2.0
6 | version: 2.2.0(svelte@3.59.0)(vite@4.3.5)
7 | svelte:
8 | specifier: ^3.59.0
9 | version: 3.59.0
10 | vite:
11 | specifier: ^4.3.5
12 | version: 4.3.5
13 | vite-plugin-monkey:
14 | specifier: ^3.2.0
15 | version: 3.2.0(vite@4.3.5)
16 |
17 | packages:
18 |
19 | /@esbuild/android-arm64@0.17.19:
20 | resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==}
21 | engines: {node: '>=12'}
22 | cpu: [arm64]
23 | os: [android]
24 | requiresBuild: true
25 | dev: true
26 | optional: true
27 |
28 | /@esbuild/android-arm@0.17.19:
29 | resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==}
30 | engines: {node: '>=12'}
31 | cpu: [arm]
32 | os: [android]
33 | requiresBuild: true
34 | dev: true
35 | optional: true
36 |
37 | /@esbuild/android-x64@0.17.19:
38 | resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==}
39 | engines: {node: '>=12'}
40 | cpu: [x64]
41 | os: [android]
42 | requiresBuild: true
43 | dev: true
44 | optional: true
45 |
46 | /@esbuild/darwin-arm64@0.17.19:
47 | resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==}
48 | engines: {node: '>=12'}
49 | cpu: [arm64]
50 | os: [darwin]
51 | requiresBuild: true
52 | dev: true
53 | optional: true
54 |
55 | /@esbuild/darwin-x64@0.17.19:
56 | resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==}
57 | engines: {node: '>=12'}
58 | cpu: [x64]
59 | os: [darwin]
60 | requiresBuild: true
61 | dev: true
62 | optional: true
63 |
64 | /@esbuild/freebsd-arm64@0.17.19:
65 | resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==}
66 | engines: {node: '>=12'}
67 | cpu: [arm64]
68 | os: [freebsd]
69 | requiresBuild: true
70 | dev: true
71 | optional: true
72 |
73 | /@esbuild/freebsd-x64@0.17.19:
74 | resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==}
75 | engines: {node: '>=12'}
76 | cpu: [x64]
77 | os: [freebsd]
78 | requiresBuild: true
79 | dev: true
80 | optional: true
81 |
82 | /@esbuild/linux-arm64@0.17.19:
83 | resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==}
84 | engines: {node: '>=12'}
85 | cpu: [arm64]
86 | os: [linux]
87 | requiresBuild: true
88 | dev: true
89 | optional: true
90 |
91 | /@esbuild/linux-arm@0.17.19:
92 | resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==}
93 | engines: {node: '>=12'}
94 | cpu: [arm]
95 | os: [linux]
96 | requiresBuild: true
97 | dev: true
98 | optional: true
99 |
100 | /@esbuild/linux-ia32@0.17.19:
101 | resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==}
102 | engines: {node: '>=12'}
103 | cpu: [ia32]
104 | os: [linux]
105 | requiresBuild: true
106 | dev: true
107 | optional: true
108 |
109 | /@esbuild/linux-loong64@0.17.19:
110 | resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==}
111 | engines: {node: '>=12'}
112 | cpu: [loong64]
113 | os: [linux]
114 | requiresBuild: true
115 | dev: true
116 | optional: true
117 |
118 | /@esbuild/linux-mips64el@0.17.19:
119 | resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==}
120 | engines: {node: '>=12'}
121 | cpu: [mips64el]
122 | os: [linux]
123 | requiresBuild: true
124 | dev: true
125 | optional: true
126 |
127 | /@esbuild/linux-ppc64@0.17.19:
128 | resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==}
129 | engines: {node: '>=12'}
130 | cpu: [ppc64]
131 | os: [linux]
132 | requiresBuild: true
133 | dev: true
134 | optional: true
135 |
136 | /@esbuild/linux-riscv64@0.17.19:
137 | resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==}
138 | engines: {node: '>=12'}
139 | cpu: [riscv64]
140 | os: [linux]
141 | requiresBuild: true
142 | dev: true
143 | optional: true
144 |
145 | /@esbuild/linux-s390x@0.17.19:
146 | resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==}
147 | engines: {node: '>=12'}
148 | cpu: [s390x]
149 | os: [linux]
150 | requiresBuild: true
151 | dev: true
152 | optional: true
153 |
154 | /@esbuild/linux-x64@0.17.19:
155 | resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==}
156 | engines: {node: '>=12'}
157 | cpu: [x64]
158 | os: [linux]
159 | requiresBuild: true
160 | dev: true
161 | optional: true
162 |
163 | /@esbuild/netbsd-x64@0.17.19:
164 | resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==}
165 | engines: {node: '>=12'}
166 | cpu: [x64]
167 | os: [netbsd]
168 | requiresBuild: true
169 | dev: true
170 | optional: true
171 |
172 | /@esbuild/openbsd-x64@0.17.19:
173 | resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==}
174 | engines: {node: '>=12'}
175 | cpu: [x64]
176 | os: [openbsd]
177 | requiresBuild: true
178 | dev: true
179 | optional: true
180 |
181 | /@esbuild/sunos-x64@0.17.19:
182 | resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==}
183 | engines: {node: '>=12'}
184 | cpu: [x64]
185 | os: [sunos]
186 | requiresBuild: true
187 | dev: true
188 | optional: true
189 |
190 | /@esbuild/win32-arm64@0.17.19:
191 | resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==}
192 | engines: {node: '>=12'}
193 | cpu: [arm64]
194 | os: [win32]
195 | requiresBuild: true
196 | dev: true
197 | optional: true
198 |
199 | /@esbuild/win32-ia32@0.17.19:
200 | resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==}
201 | engines: {node: '>=12'}
202 | cpu: [ia32]
203 | os: [win32]
204 | requiresBuild: true
205 | dev: true
206 | optional: true
207 |
208 | /@esbuild/win32-x64@0.17.19:
209 | resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==}
210 | engines: {node: '>=12'}
211 | cpu: [x64]
212 | os: [win32]
213 | requiresBuild: true
214 | dev: true
215 | optional: true
216 |
217 | /@jridgewell/sourcemap-codec@1.4.15:
218 | resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
219 | dev: true
220 |
221 | /@sveltejs/vite-plugin-svelte@2.2.0(svelte@3.59.0)(vite@4.3.5):
222 | resolution: {integrity: sha512-KDtdva+FZrZlyug15KlbXuubntAPKcBau0K7QhAIqC5SAy0uDbjZwoexDRx0L0J2T4niEfC6FnA9GuQQJKg+Aw==}
223 | engines: {node: ^14.18.0 || >= 16}
224 | peerDependencies:
225 | svelte: ^3.54.0
226 | vite: ^4.0.0
227 | dependencies:
228 | debug: 4.3.4
229 | deepmerge: 4.3.1
230 | kleur: 4.1.5
231 | magic-string: 0.30.0
232 | svelte: 3.59.0
233 | svelte-hmr: 0.15.2(svelte@3.59.0)
234 | vite: 4.3.5
235 | vitefu: 0.2.4(vite@4.3.5)
236 | transitivePeerDependencies:
237 | - supports-color
238 | dev: true
239 |
240 | /acorn-walk@8.2.0:
241 | resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==}
242 | engines: {node: '>=0.4.0'}
243 | dev: true
244 |
245 | /address@1.2.2:
246 | resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==}
247 | engines: {node: '>= 10.0.0'}
248 | dev: true
249 |
250 | /cross-spawn@7.0.3:
251 | resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
252 | engines: {node: '>= 8'}
253 | dependencies:
254 | path-key: 3.1.1
255 | shebang-command: 2.0.0
256 | which: 2.0.2
257 | dev: true
258 |
259 | /debug@4.3.4:
260 | resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
261 | engines: {node: '>=6.0'}
262 | peerDependencies:
263 | supports-color: '*'
264 | peerDependenciesMeta:
265 | supports-color:
266 | optional: true
267 | dependencies:
268 | ms: 2.1.2
269 | dev: true
270 |
271 | /deepmerge@4.3.1:
272 | resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
273 | engines: {node: '>=0.10.0'}
274 | dev: true
275 |
276 | /define-lazy-prop@2.0.0:
277 | resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
278 | engines: {node: '>=8'}
279 | dev: true
280 |
281 | /detect-port@1.5.1:
282 | resolution: {integrity: sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==}
283 | hasBin: true
284 | dependencies:
285 | address: 1.2.2
286 | debug: 4.3.4
287 | transitivePeerDependencies:
288 | - supports-color
289 | dev: true
290 |
291 | /dom-serializer@2.0.0:
292 | resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
293 | dependencies:
294 | domelementtype: 2.3.0
295 | domhandler: 5.0.3
296 | entities: 4.5.0
297 | dev: true
298 |
299 | /domelementtype@2.3.0:
300 | resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
301 | dev: true
302 |
303 | /domhandler@5.0.3:
304 | resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
305 | engines: {node: '>= 4'}
306 | dependencies:
307 | domelementtype: 2.3.0
308 | dev: true
309 |
310 | /domutils@3.1.0:
311 | resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
312 | dependencies:
313 | dom-serializer: 2.0.0
314 | domelementtype: 2.3.0
315 | domhandler: 5.0.3
316 | dev: true
317 |
318 | /entities@4.5.0:
319 | resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
320 | engines: {node: '>=0.12'}
321 | dev: true
322 |
323 | /esbuild@0.17.19:
324 | resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==}
325 | engines: {node: '>=12'}
326 | hasBin: true
327 | requiresBuild: true
328 | optionalDependencies:
329 | '@esbuild/android-arm': 0.17.19
330 | '@esbuild/android-arm64': 0.17.19
331 | '@esbuild/android-x64': 0.17.19
332 | '@esbuild/darwin-arm64': 0.17.19
333 | '@esbuild/darwin-x64': 0.17.19
334 | '@esbuild/freebsd-arm64': 0.17.19
335 | '@esbuild/freebsd-x64': 0.17.19
336 | '@esbuild/linux-arm': 0.17.19
337 | '@esbuild/linux-arm64': 0.17.19
338 | '@esbuild/linux-ia32': 0.17.19
339 | '@esbuild/linux-loong64': 0.17.19
340 | '@esbuild/linux-mips64el': 0.17.19
341 | '@esbuild/linux-ppc64': 0.17.19
342 | '@esbuild/linux-riscv64': 0.17.19
343 | '@esbuild/linux-s390x': 0.17.19
344 | '@esbuild/linux-x64': 0.17.19
345 | '@esbuild/netbsd-x64': 0.17.19
346 | '@esbuild/openbsd-x64': 0.17.19
347 | '@esbuild/sunos-x64': 0.17.19
348 | '@esbuild/win32-arm64': 0.17.19
349 | '@esbuild/win32-ia32': 0.17.19
350 | '@esbuild/win32-x64': 0.17.19
351 | dev: true
352 |
353 | /fsevents@2.3.2:
354 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
355 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
356 | os: [darwin]
357 | requiresBuild: true
358 | dev: true
359 | optional: true
360 |
361 | /htmlparser2@8.0.2:
362 | resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
363 | dependencies:
364 | domelementtype: 2.3.0
365 | domhandler: 5.0.3
366 | domutils: 3.1.0
367 | entities: 4.5.0
368 | dev: true
369 |
370 | /is-docker@2.2.1:
371 | resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
372 | engines: {node: '>=8'}
373 | hasBin: true
374 | dev: true
375 |
376 | /is-wsl@2.2.0:
377 | resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
378 | engines: {node: '>=8'}
379 | dependencies:
380 | is-docker: 2.2.1
381 | dev: true
382 |
383 | /isexe@2.0.0:
384 | resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
385 | dev: true
386 |
387 | /kleur@4.1.5:
388 | resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
389 | engines: {node: '>=6'}
390 | dev: true
391 |
392 | /magic-string@0.30.0:
393 | resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==}
394 | engines: {node: '>=12'}
395 | dependencies:
396 | '@jridgewell/sourcemap-codec': 1.4.15
397 | dev: true
398 |
399 | /mrmime@1.0.1:
400 | resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==}
401 | engines: {node: '>=10'}
402 | dev: true
403 |
404 | /ms@2.1.2:
405 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
406 | dev: true
407 |
408 | /nanoid@3.3.6:
409 | resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
410 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
411 | hasBin: true
412 | dev: true
413 |
414 | /open@8.4.2:
415 | resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
416 | engines: {node: '>=12'}
417 | dependencies:
418 | define-lazy-prop: 2.0.0
419 | is-docker: 2.2.1
420 | is-wsl: 2.2.0
421 | dev: true
422 |
423 | /path-key@3.1.1:
424 | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
425 | engines: {node: '>=8'}
426 | dev: true
427 |
428 | /picocolors@1.0.0:
429 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
430 | dev: true
431 |
432 | /postcss@8.4.24:
433 | resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==}
434 | engines: {node: ^10 || ^12 || >=14}
435 | dependencies:
436 | nanoid: 3.3.6
437 | picocolors: 1.0.0
438 | source-map-js: 1.0.2
439 | dev: true
440 |
441 | /rollup@3.23.0:
442 | resolution: {integrity: sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==}
443 | engines: {node: '>=14.18.0', npm: '>=8.0.0'}
444 | hasBin: true
445 | optionalDependencies:
446 | fsevents: 2.3.2
447 | dev: true
448 |
449 | /shebang-command@2.0.0:
450 | resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
451 | engines: {node: '>=8'}
452 | dependencies:
453 | shebang-regex: 3.0.0
454 | dev: true
455 |
456 | /shebang-regex@3.0.0:
457 | resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
458 | engines: {node: '>=8'}
459 | dev: true
460 |
461 | /source-map-js@1.0.2:
462 | resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
463 | engines: {node: '>=0.10.0'}
464 | dev: true
465 |
466 | /svelte-hmr@0.15.2(svelte@3.59.0):
467 | resolution: {integrity: sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==}
468 | engines: {node: ^12.20 || ^14.13.1 || >= 16}
469 | peerDependencies:
470 | svelte: ^3.19.0 || ^4.0.0-next.0
471 | dependencies:
472 | svelte: 3.59.0
473 | dev: true
474 |
475 | /svelte@3.59.0:
476 | resolution: {integrity: sha512-Di1wVPwdWriw5pSyInMRpr5EZmwrzKxtDKv5aXu8A/WDUi59Y5bIvl42eLef0x1vwz+ZtrjdnT8nXir2bDqR/A==}
477 | engines: {node: '>= 8'}
478 | dev: true
479 |
480 | /systemjs@6.14.1:
481 | resolution: {integrity: sha512-8ftwWd+XnQtZ/aGbatrN4QFNGrKJzmbtixW+ODpci7pyoTajg4sonPP8aFLESAcuVxaC1FyDESt+SpfFCH9rZQ==}
482 | dev: true
483 |
484 | /vite-plugin-monkey@3.2.0(vite@4.3.5):
485 | resolution: {integrity: sha512-zXnDyDRmyelmAMZG5anbUdkRmynXpnvAnRCapEWKTdHF99bgT+XXa5LOJCdg/6kyddPcRyt2KCKI8fom+A0mFw==}
486 | engines: {node: ^14.18 || >= 16, pnpm: '>=6'}
487 | peerDependencies:
488 | vite: '>=3.0.0'
489 | peerDependenciesMeta:
490 | vite:
491 | optional: true
492 | dependencies:
493 | acorn-walk: 8.2.0
494 | cross-spawn: 7.0.3
495 | detect-port: 1.5.1
496 | htmlparser2: 8.0.2
497 | magic-string: 0.30.0
498 | mrmime: 1.0.1
499 | open: 8.4.2
500 | picocolors: 1.0.0
501 | systemjs: 6.14.1
502 | vite: 4.3.5
503 | transitivePeerDependencies:
504 | - supports-color
505 | dev: true
506 |
507 | /vite@4.3.5:
508 | resolution: {integrity: sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==}
509 | engines: {node: ^14.18.0 || >=16.0.0}
510 | hasBin: true
511 | peerDependencies:
512 | '@types/node': '>= 14'
513 | less: '*'
514 | sass: '*'
515 | stylus: '*'
516 | sugarss: '*'
517 | terser: ^5.4.0
518 | peerDependenciesMeta:
519 | '@types/node':
520 | optional: true
521 | less:
522 | optional: true
523 | sass:
524 | optional: true
525 | stylus:
526 | optional: true
527 | sugarss:
528 | optional: true
529 | terser:
530 | optional: true
531 | dependencies:
532 | esbuild: 0.17.19
533 | postcss: 8.4.24
534 | rollup: 3.23.0
535 | optionalDependencies:
536 | fsevents: 2.3.2
537 | dev: true
538 |
539 | /vitefu@0.2.4(vite@4.3.5):
540 | resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==}
541 | peerDependencies:
542 | vite: ^3.0.0 || ^4.0.0
543 | peerDependenciesMeta:
544 | vite:
545 | optional: true
546 | dependencies:
547 | vite: 4.3.5
548 | dev: true
549 |
550 | /which@2.0.2:
551 | resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
552 | engines: {node: '>= 8'}
553 | hasBin: true
554 | dependencies:
555 | isexe: 2.0.0
556 | dev: true
557 |
--------------------------------------------------------------------------------
/src/utils/masonry.pkgd.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Masonry PACKAGED v4.2.2
3 | * Cascading grid layout library
4 | * https://masonry.desandro.com
5 | * MIT License
6 | * by David DeSandro
7 | */
8 |
9 | !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o
e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
--------------------------------------------------------------------------------
/src/sidepanel.svelte:
--------------------------------------------------------------------------------
1 |
158 |
159 |
160 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
257 |
258 |
259 |
260 |
261 |
262 |
303 |
304 | {#if $_show_debug_btn}
305 |
306 |
309 |
310 |
311 |
314 |
315 |
316 |
319 |
320 |
321 |
324 | {/if}
325 |
326 |
327 |
328 |
329 | {#if $_show_configPanel}
330 |
331 | ($_show_configPanel = false)}
335 | >
336 |
337 |
338 |
339 |
详细配置面板
340 |
341 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 | {#if $_current_domain == "kp.m-team.cc"}
372 |
373 |
MT专用配置
374 |
375 |
381 |
382 |
383 | {/if}
384 |
385 |
386 |
387 |
常用配置
388 |
389 | {
396 | window.CHANGE_CARD_LAYOUT();
397 | }}
398 | />
399 |
400 |
408 |
415 |
421 | {#if $_show_nexus_pic}
422 |
430 |
438 |
439 | {/if}
440 |
441 |
442 |
445 |
446 |
447 | {#if false}
448 |
449 |
466 |
467 |
468 |
484 |
485 |
486 |
502 |
503 |
504 |
522 | {/if}
523 |
524 |
525 |
526 |
527 |
528 |
卡片信息
529 |
530 |
531 |
539 |
540 |
541 |
542 |
543 |
660 |
661 |
662 |
663 | {/if}
664 |
665 |
666 |
667 | 重置瀑布流配置边栏位置
668 |
669 |
853 |
--------------------------------------------------------------------------------