Skip to content

Commit 8ed9d48

Browse files
authored
Merge branch 'hoothin:master' into rules_update
2 parents da7e6bf + 0143b6c commit 8ed9d48

32 files changed

+35241
-945
lines changed

.github/workflows/build-dist.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build Picviewer CE+ Dist
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'Picviewer CE*/Picviewer CE*.user.js'
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Replace require paths, add timestamp, and create dist file
20+
run: |
21+
sed -E \
22+
-e "s#https://update.greasyfork.org/scripts/6158/([0-9]+)/GM_config%20CN.js#https://hoothin.github.io/UserScripts/Picviewer%20CE%2B/GM_config%20CN.js?v=\1#g" \
23+
-e "s#https://update.greasyfork.org/scripts/438080/([0-9]+)/pvcep_rules.js#https://hoothin.github.io/UserScripts/Picviewer%20CE%2B/pvcep_rules.js?v=\1#g" \
24+
-e "s#https://update.greasyfork.org/scripts/440698/([0-9]+)/pvcep_lang.js#https://hoothin.github.io/UserScripts/Picviewer%20CE%2B/pvcep_lang.js?v=\1#g" \
25+
"Picviewer CE+/Picviewer CE+.user.js" > "Picviewer CE+/dist.user.js"
26+
27+
- name: Commit and push dist.user.js
28+
run: |
29+
git config --local user.email "[email protected]"
30+
git config --local user.name "hoothin-update"
31+
git add "Picviewer CE+/dist.user.js"
32+
git commit -m "chore(Picviewer CE+): Auto-generate dist.user.js"
33+
git push https://${{ secrets.ACTION_SECRET }}@github.com/${{ github.repository }}

.github/workflows/jekyll-gh-pages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
paths-ignore:
99
- 'Pagetual/items_all.json'
1010
- 'Pagetual/pagetualRules.json'
11+
- '.github/*'
12+
- '.github/*/*'
1113
workflow_run:
1214
workflows: ["Update Version on File Change"]
1315
types:

91wii/91wii.user.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

91wii/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

BingBgForBaidu/BingBgForBaidu.user.js

Lines changed: 21 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

DownloadAllContent/DownloadAllContent.user.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// @name:zh-TW 怠惰小説下載器
55
// @name:ja 怠惰小説ダウンローダー
66
// @namespace hoothin
7-
// @version 2.8.3.18
7+
// @version 2.8.3.19
88
// @description Lightweight web scraping script. Fetch and download main textual content from the current page, provide special support for novels
99
// @description:zh-CN 通用网站内容爬虫抓取工具,可批量抓取任意站点的小说、论坛内容等并保存为TXT文档
1010
// @description:zh-TW 通用網站內容爬蟲抓取工具,可批量抓取任意站點的小說、論壇內容等並保存為TXT文檔
@@ -931,7 +931,7 @@ if (window.top != window.self) {
931931
height: 30px;line-height: 30px;display:block;color:#FFF;text-align:center;font-size: 12px;font-weight: bold;font-family: arial;background: initial; float: initial;
932932
}
933933
#txtDownQuit+div{
934-
position:absolute;right:0px;bottom:2px;cursor: pointer;max-width:85px;
934+
position:absolute;right:0px;bottom:2px;cursor: pointer;display: flex;
935935
}
936936
#txtDownQuit+div>button{
937937
background: #008aff;border: 0;padding: 5px;border-radius: 6px;color: white;float: right;margin: 1px;height: 25px;line-height: 16px;cursor: pointer;overflow: hidden;
@@ -1071,7 +1071,7 @@ if (window.top != window.self) {
10711071
console.warn(e);
10721072
}
10731073
}
1074-
function packLink(doc, item, curIndex) {
1074+
function packLink(doc, item) {
10751075
if (customTitle) {
10761076
try {
10771077
let title = doc.querySelector(customTitle);
@@ -1082,9 +1082,6 @@ if (window.top != window.self) {
10821082
console.warn(e);
10831083
}
10841084
}
1085-
if (prefix) {
1086-
item.innerText = prefix.replace(/\$i/g, ++curIndex) + item.innerText;
1087-
}
10881085
}
10891086
function getIframe() {
10901087
if (iframePool && iframePool.length) return iframePool.shift();
@@ -1157,7 +1154,7 @@ if (window.top != window.self) {
11571154
}
11581155
}
11591156
let base = doc.querySelector("base");
1160-
let nextPages = !disableNextPage && !processFunc && await checkNextPage(doc, base ? base.href : aTag.href);
1157+
let nextPages = !disableNextPage && (!processFunc || nextPageFunc) && await checkNextPage(doc, base ? base.href : aTag.href);
11611158
if (nextPages) {
11621159
if (!nextPages.length) nextPages = [nextPages];
11631160
nextPages.forEach(nextPage => {
@@ -1424,11 +1421,16 @@ if (window.top != window.self) {
14241421
}
14251422
}
14261423
rCats = rCats.filter(function(e){return e!=null});
1424+
if (prefix) {
1425+
for(i=0;i<rCats.length;i++){
1426+
rCats[i]=prefix.replace(/\$i/g, i+1) + rCats[i];
1427+
}
1428+
}
14271429
}
14281430
var waitForComplete;
14291431
function processDoc(i, aTag, doc, cause, check){
14301432
let cbFunc=content=>{
1431-
packLink(doc, aTag, i);
1433+
packLink(doc, aTag);
14321434
let isHref = "";
14331435
let saveUrl = GM_getValue("saveUrl");
14341436
if (saveUrl){
@@ -1534,10 +1536,10 @@ if (window.top != window.self) {
15341536

15351537
function getPageContent(doc, cb, url){
15361538
if(!doc)return i18n.error;
1537-
if(doc.body && !doc.body.children.length)return doc.body.innerText;
15381539
if(processFunc){
15391540
return processFunc(doc, cb, url);
15401541
}
1542+
if(doc.body && !doc.body.children.length)return doc.body.innerText;
15411543
[].forEach.call(doc.querySelectorAll("span,div,ul"),function(item){
15421544
var thisStyle=doc.defaultView?doc.defaultView.getComputedStyle(item):item.style;
15431545
if(thisStyle && (thisStyle.display=="none" || (item.nodeName=="SPAN" && thisStyle.fontSize=="0px"))){

0 commit comments

Comments
 (0)