xmoj-script 1.1.14 → 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/Daily.yml +1 -1
- package/.github/workflows/DependencyScan.yml +1 -1
- package/.github/workflows/sitemap-automation.yml +40 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +1 -1
- package/Update.json +95 -1
- package/XMOJ.user.js +11 -18
- package/index.html +1 -1
- package/package.json +1 -1
- package/sitemap-live/0.xml +0 -26
@@ -0,0 +1,40 @@
|
|
1
|
+
name: Generate sitemap
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
sitemap_job:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
name: Generate a sitemap
|
11
|
+
steps:
|
12
|
+
- name: Checkout the repo
|
13
|
+
uses: actions/checkout@v4
|
14
|
+
with:
|
15
|
+
fetch-depth: 0
|
16
|
+
|
17
|
+
- name: Generate the sitemap
|
18
|
+
id: sitemap
|
19
|
+
uses: cicirello/generate-sitemap@v1
|
20
|
+
with:
|
21
|
+
exclude-paths: /404.html
|
22
|
+
base-url-path: https://xmoj-bbs.tech/
|
23
|
+
|
24
|
+
- name: Output stats
|
25
|
+
run: |
|
26
|
+
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
|
27
|
+
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
|
28
|
+
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
|
29
|
+
|
30
|
+
- name: Create Pull Request
|
31
|
+
uses: peter-evans/create-pull-request@v5.0.2
|
32
|
+
with:
|
33
|
+
title: "Automated sitemap update"
|
34
|
+
body: >
|
35
|
+
Automated changes in sitemap.xml.
|
36
|
+
commit-message: "Automated sitemap update."
|
37
|
+
author: PythonSmall-Q <seanoj_noreply@yeah.net>
|
38
|
+
committer: PythonSmall-Q <seanoj_noreply@yeah.net>
|
39
|
+
branch: create-pull-request/sitemap
|
40
|
+
delete-branch: true
|
package/.idea/vcs.xml
ADDED
package/README.md
CHANGED
package/Update.json
CHANGED
@@ -916,9 +916,103 @@
|
|
916
916
|
"UpdateDate": 1705756153752,
|
917
917
|
"Prerelease": true,
|
918
918
|
"UpdateContents": [
|
919
|
+
{
|
920
|
+
"PR": 355,
|
921
|
+
"Description": "fix #332"
|
922
|
+
},
|
919
923
|
{
|
920
924
|
"PR": 356,
|
921
|
-
"Description": "
|
925
|
+
"Description": "N/A"
|
926
|
+
}
|
927
|
+
],
|
928
|
+
"Notes": "修复题解标题"
|
929
|
+
},
|
930
|
+
"1.1.15": {
|
931
|
+
"UpdateDate": 1705807807990,
|
932
|
+
"Prerelease": true,
|
933
|
+
"UpdateContents": [
|
934
|
+
{
|
935
|
+
"PR": 357,
|
936
|
+
"Description": "cleanup"
|
937
|
+
}
|
938
|
+
],
|
939
|
+
"Notes": "This release fixes a lot of things"
|
940
|
+
},
|
941
|
+
"1.1.16": {
|
942
|
+
"UpdateDate": 1705807913261,
|
943
|
+
"Prerelease": false,
|
944
|
+
"UpdateContents": [
|
945
|
+
{
|
946
|
+
"PR": 327,
|
947
|
+
"Description": "优化用户体验"
|
948
|
+
},
|
949
|
+
{
|
950
|
+
"PR": 329,
|
951
|
+
"Description": "增加权限"
|
952
|
+
},
|
953
|
+
{
|
954
|
+
"PR": 340,
|
955
|
+
"Description": "add the native link"
|
956
|
+
},
|
957
|
+
{
|
958
|
+
"PR": 356,
|
959
|
+
"Description": "N/A"
|
960
|
+
},
|
961
|
+
{
|
962
|
+
"PR": 355,
|
963
|
+
"Description": "fix #332"
|
964
|
+
},
|
965
|
+
{
|
966
|
+
"PR": 357,
|
967
|
+
"Description": "cleanup"
|
968
|
+
}
|
969
|
+
],
|
970
|
+
"Notes": "No release notes were provided for this release."
|
971
|
+
},
|
972
|
+
"1.1.17": {
|
973
|
+
"UpdateDate": 1705808495397,
|
974
|
+
"Prerelease": false,
|
975
|
+
"UpdateContents": [
|
976
|
+
{
|
977
|
+
"PR": 327,
|
978
|
+
"Description": "优化用户体验"
|
979
|
+
},
|
980
|
+
{
|
981
|
+
"PR": 329,
|
982
|
+
"Description": "增加权限"
|
983
|
+
},
|
984
|
+
{
|
985
|
+
"PR": 340,
|
986
|
+
"Description": "add the native link"
|
987
|
+
},
|
988
|
+
{
|
989
|
+
"PR": 356,
|
990
|
+
"Description": "N/A"
|
991
|
+
},
|
992
|
+
{
|
993
|
+
"PR": 355,
|
994
|
+
"Description": "fix #332"
|
995
|
+
},
|
996
|
+
{
|
997
|
+
"PR": 357,
|
998
|
+
"Description": "cleanup"
|
999
|
+
}
|
1000
|
+
],
|
1001
|
+
"Notes": "No release notes were provided for this release."
|
1002
|
+
},
|
1003
|
+
"1.1.18": {
|
1004
|
+
"UpdateDate": 1705813603117,
|
1005
|
+
"Prerelease": false,
|
1006
|
+
"UpdateContents": [],
|
1007
|
+
"Notes": "No release notes were provided for this release."
|
1008
|
+
},
|
1009
|
+
"1.1.19": {
|
1010
|
+
"UpdateDate": 1705841193051,
|
1011
|
+
"Prerelease": true,
|
1012
|
+
"UpdateContents": [
|
1013
|
+
{
|
1014
|
+
"PR": 372,
|
1015
|
+
"Description": "use the same peram (?to_user) as xmoj"
|
922
1016
|
}
|
923
1017
|
],
|
924
1018
|
"Notes": "No release notes were provided for this release."
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.1.
|
3
|
+
// @version 1.1.19
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -13,14 +13,12 @@
|
|
13
13
|
// @require https://cdn.bootcdn.net/ajax/libs/diff_match_patch/20121119/diff_match_patch_uncompressed.js
|
14
14
|
// @require https://cdn.bootcdn.net/ajax/libs/dompurify/3.0.2/purify.min.js
|
15
15
|
// @require https://cdn.bootcdn.net/ajax/libs/marked/4.3.0/marked.min.js
|
16
|
-
// @require https://scriptcat.org/lib/881/1.2.0/script-statistics.js
|
17
16
|
// @grant GM_registerMenuCommand
|
18
17
|
// @grant GM_xmlhttpRequest
|
19
18
|
// @grant GM_setClipboard
|
20
19
|
// @grant unsafeWindow
|
21
20
|
// @grant GM_setValue
|
22
21
|
// @grant GM_getValue
|
23
|
-
// @antifeature tracking
|
24
22
|
// @homepage https://www.xmoj-bbs.tech/
|
25
23
|
// @supportURL https://github.com/XMOJ-Script-dev/XMOJ-Script
|
26
24
|
// @connect api.xmoj-bbs.tech
|
@@ -41,14 +39,6 @@
|
|
41
39
|
const CaptchaSiteKey = "0x4AAAAAAALBT58IhyDViNmv";
|
42
40
|
const AdminUserList = ["zhuchenrui2", "shanwenxiao", "admin", "shihongxi"];
|
43
41
|
|
44
|
-
try {
|
45
|
-
new SC_Statistic({
|
46
|
-
key: "9ghqb0n5holr3ea7",
|
47
|
-
});
|
48
|
-
} catch (e) {
|
49
|
-
console.warn("statistic failed: ", e);
|
50
|
-
}
|
51
|
-
|
52
42
|
let PurifyHTML = (Input) => {
|
53
43
|
return DOMPurify.sanitize(Input, {
|
54
44
|
"ALLOWED_TAGS": ["a", "b", "big", "blockquote", "br", "code", "dd", "del", "div", "dl", "dt", "em", "h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "hr", "i", "img", "ins", "kbd", "li", "ol", "p", "pre", "q", "rp", "rt", "ruby", "s", "samp", "strike", "strong", "sub", "sup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "tt", "ul", "var"],
|
@@ -956,7 +946,7 @@ else {
|
|
956
946
|
ToastViewButton.classList.add("btn", "btn-primary", "btn-sm");
|
957
947
|
ToastViewButton.innerText = "查看";
|
958
948
|
ToastViewButton.addEventListener("click", () => {
|
959
|
-
open("https://www.xmoj.tech/mail.php?
|
949
|
+
open("https://www.xmoj.tech/mail.php?to_user=" + MentionList[i].FromUserID, "_blank");
|
960
950
|
RequestAPI("ReadMailMention", {
|
961
951
|
"MentionID": Number(MentionList[i].MentionID)
|
962
952
|
}, () => { });
|
@@ -1221,7 +1211,7 @@ else {
|
|
1221
1211
|
document.querySelector("body > div > div.mt-3 > center").lastChild.style.marginLeft = "10px";
|
1222
1212
|
//修复提交按钮
|
1223
1213
|
let SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(12)');
|
1224
|
-
if (SubmitLink == null) {
|
1214
|
+
if (SubmitLink == null) { //a special type of problem
|
1225
1215
|
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(10)');
|
1226
1216
|
}
|
1227
1217
|
if (SubmitLink == null) {
|
@@ -3426,6 +3416,9 @@ int main()
|
|
3426
3416
|
Pagination += `</ul></nav>`;
|
3427
3417
|
document.querySelector("body > div > div.mt-3 > center").innerHTML += Pagination;
|
3428
3418
|
} else if (location.pathname == "/problem_solution.php") {
|
3419
|
+
if (UtilityEnabled("RemoveUseless")) {
|
3420
|
+
document.querySelector("h2.lang_en").remove(); //fixes #332
|
3421
|
+
}
|
3429
3422
|
if (UtilityEnabled("CopyMD")) {
|
3430
3423
|
await fetch(location.href).then((Response) => {
|
3431
3424
|
return Response.text();
|
@@ -3575,7 +3568,7 @@ int main()
|
|
3575
3568
|
}
|
3576
3569
|
});
|
3577
3570
|
} else if (location.pathname == "/mail.php") {
|
3578
|
-
if (SearchParams.get("
|
3571
|
+
if (SearchParams.get("to_user") == null) {
|
3579
3572
|
document.querySelector("body > div > div.mt-3").innerHTML = `<div class="row g-2 align-items-center">
|
3580
3573
|
<div class="col-auto form-floating">
|
3581
3574
|
<input class="form-control" id="Username" placeholder=" " spellcheck="false" data-ms-editor="true">
|
@@ -3619,7 +3612,7 @@ int main()
|
|
3619
3612
|
let Row = document.createElement("tr"); ReceiveTable.children[1].appendChild(Row);
|
3620
3613
|
let UsernameCell = document.createElement("td"); Row.appendChild(UsernameCell);
|
3621
3614
|
let UsernameSpan = document.createElement("span"); UsernameCell.appendChild(UsernameSpan);
|
3622
|
-
GetUsernameHTML(UsernameSpan, Data[i].OtherUser, false, "https://www.xmoj.tech/mail.php?
|
3615
|
+
GetUsernameHTML(UsernameSpan, Data[i].OtherUser, false, "https://www.xmoj.tech/mail.php?to_user=");
|
3623
3616
|
if (Data[i].UnreadCount != 0) {
|
3624
3617
|
let UnreadCountSpan = document.createElement("span"); UsernameCell.appendChild(UnreadCountSpan);
|
3625
3618
|
UnreadCountSpan.className = "ms-1 badge text-bg-danger";
|
@@ -3694,7 +3687,7 @@ int main()
|
|
3694
3687
|
</thead>
|
3695
3688
|
<tbody></tbody>
|
3696
3689
|
</table>`;
|
3697
|
-
GetUsernameHTML(ToUser, SearchParams.get("
|
3690
|
+
GetUsernameHTML(ToUser, SearchParams.get("to_user"));
|
3698
3691
|
let RefreshMessage = (Silent = true) => {
|
3699
3692
|
if (!Silent) {
|
3700
3693
|
MessageTable.children[1].innerHTML = "";
|
@@ -3707,7 +3700,7 @@ int main()
|
|
3707
3700
|
}
|
3708
3701
|
}
|
3709
3702
|
RequestAPI("GetMail", {
|
3710
|
-
"OtherUser": String(SearchParams.get("
|
3703
|
+
"OtherUser": String(SearchParams.get("to_user"))
|
3711
3704
|
}, async (ResponseData) => {
|
3712
3705
|
if (ResponseData.Success) {
|
3713
3706
|
ErrorElement.style.display = "none";
|
@@ -3751,7 +3744,7 @@ int main()
|
|
3751
3744
|
Send.children[0].style.display = "";
|
3752
3745
|
let ContentData = Content.value;
|
3753
3746
|
RequestAPI("SendMail", {
|
3754
|
-
"ToUser": String(SearchParams.get("
|
3747
|
+
"ToUser": String(SearchParams.get("to_user")),
|
3755
3748
|
"Content": String(ContentData)
|
3756
3749
|
}, (ResponseData) => {
|
3757
3750
|
Send.disabled = false;
|
package/index.html
CHANGED
@@ -60,7 +60,7 @@
|
|
60
60
|
<div id="Introduce" class="container mb-3">
|
61
61
|
<h2>介绍</h2>
|
62
62
|
<p>
|
63
|
-
小明的OJ
|
63
|
+
小明的OJ增强脚本是一个功能强大的浏览器扩展,旨在提升用户在小明的OJ(某虚拟在线竞赛平台)上的使用体验。
|
64
64
|
该脚本通过添加多种实用功能和界面优化,使用户能够更高效地参与竞赛、管理代码和享受更好的界面交互。
|
65
65
|
</p>
|
66
66
|
<div id="IntroduceCarousel" class="carousel slide col-8" data-bs-ride="carousel">
|
package/package.json
CHANGED
package/sitemap-live/0.xml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
2
|
-
<url>
|
3
|
-
<loc>https://www.seanoj.edu.eu.org/index.html</loc>
|
4
|
-
<lastmod>2023-09-23T02:40:29+00:00</lastmod>
|
5
|
-
<changefreq>daily</changefreq>
|
6
|
-
<priority>0.9</priority>
|
7
|
-
</url>
|
8
|
-
<url>
|
9
|
-
<loc>https://next.seanoj.edu.eu.org/index.html</loc>
|
10
|
-
<lastmod>2023-09-23T02:40:29+00:00</lastmod>
|
11
|
-
<changefreq>daily</changefreq>
|
12
|
-
<priority>0.9</priority>
|
13
|
-
</url>
|
14
|
-
<url>
|
15
|
-
<loc>https://www.xmoj-bbs.tech/index.html</loc>
|
16
|
-
<lastmod>2023-09-23T02:40:29+00:00</lastmod>
|
17
|
-
<changefreq>daily</changefreq>
|
18
|
-
<priority>0.9</priority>
|
19
|
-
</url>
|
20
|
-
<url>
|
21
|
-
<loc>https://next.xmoj-bbs.tech/index.html</loc>
|
22
|
-
<lastmod>2023-09-23T02:40:29+00:00</lastmod>
|
23
|
-
<changefreq>daily</changefreq>
|
24
|
-
<priority>0.9</priority>
|
25
|
-
</url>
|
26
|
-
</urlset>
|