Skip to content

Commit 8645f68

Browse files
committed
2 parents 90526d2 + 645592e commit 8645f68

4 files changed

Lines changed: 45 additions & 9 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
| [steam-multisell](/packages/steam-multisell) | Steam 批量出售 | [GitHub](https://github.com/IronKinoko/userscripts/raw/dist/steam-multisell.user.js) |
2121
| [bili-live](/packages/bili-live) | bilibili 直播间优化 | [GitHub](https://github.com/IronKinoko/userscripts/raw/dist/bili-live.user.js) |
2222

23+
### 其他在用的脚本
24+
25+
| name/模块 | descprition/描述 | install/安装 |
26+
| ---------------- | ---------------------- | ----------------------------------------------------- |
27+
| POE2 Trade | POE 交易繁体化 | [greasyfork](https://greasyfork.org/scripts/520190) |
28+
| POE2 Trade ST | POE 交易简体化 | [greasyfork](https://greasyfork.org/scripts/522265) |
29+
| Bilibili-Evolved | 强大的哔哩哔哩增强脚本 | [GitHub](https://github.com/the1812/Bilibili-Evolved) |
30+
2331
## iOS & Mac safari install
2432

2533
Use [quoid/userscripts](https://github.com/quoid/userscripts)

packages/copymanga/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# copymanga
22

3+
## 1.5.11
4+
5+
### Patch Changes
6+
7+
- d06a42c: feat: 支持九宫格点击翻页
8+
39
## 1.5.10
410

511
### Patch Changes

packages/copymanga/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "copymanga",
3-
"version": "1.5.10",
3+
"version": "1.5.11",
44
"description": "处理图片资源加载失败时自动重新加载",
55
"main": "index.js",
66
"scripts": {

packages/copymanga/src/h5.ts

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,36 @@ async function injectImageData() {
411411
$('.comicContentPopupImageList').prepend(html)
412412
$('.comicContentPopupImageItem').on('click', (e) => {
413413
const { innerWidth, innerHeight } = window
414-
const x = e.clientX
415-
const y = e.clientY
416-
if (
417-
innerWidth / 3 < x &&
418-
x < (innerWidth / 3) * 2 &&
419-
innerHeight / 3 < y &&
420-
y < (innerHeight / 3) * 2
421-
) {
414+
const xp = e.clientX / innerWidth
415+
const yp = e.clientY / innerHeight
416+
const t = 0.3
417+
const h = window.innerHeight * 0.8
418+
419+
// prettier-ignore
420+
const map = [
421+
-1, -1, 1,
422+
-1, 0, 1,
423+
-1, 1, 1,
424+
]
425+
426+
const isOpen =
427+
$('.comicContentPopup .comicControlTop').css('display') !== 'none'
428+
if (isOpen) {
429+
const li = $('.k-open-control-item').get(0)
430+
li?.dispatchEvent(fakeClickEvent())
431+
return
432+
}
433+
434+
const getRegionIndex = (p: number) => (p < t ? 0 : p > 1 - t ? 2 : 1)
435+
const idx = getRegionIndex(xp) + getRegionIndex(yp) * 3
436+
437+
if (idx < 0 || idx >= map.length) return
438+
const v = map[idx]
439+
if (v === -1) {
440+
window.scrollBy({ top: -h, behavior: 'smooth' })
441+
} else if (v === 1) {
442+
window.scrollBy({ top: h, behavior: 'smooth' })
443+
} else {
422444
const li = $('.k-open-control-item').get(0)
423445
li?.dispatchEvent(fakeClickEvent())
424446
}

0 commit comments

Comments
 (0)