xmoj-script 1.2.39 → 1.2.42
Sign up to get free protection for your applications and to get access to all the features.
- package/Update/UpdateVersion.js +0 -7
- package/Update.json +73 -0
- package/XMOJ.user.js +27 -28
- package/package.json +1 -1
package/Update/UpdateVersion.js
CHANGED
@@ -14,13 +14,6 @@ var JSFileContent = readFileSync(JSFileName, "utf8");
|
|
14
14
|
execSync("git config --global user.email \"github-actions[bot]@users.noreply.github.com\"");
|
15
15
|
execSync("git config --global user.name \"github-actions[bot]\"");
|
16
16
|
if (JSONFileContent.includes('//!ci-no-touch')) {
|
17
|
-
var updatedContent = JSONFileContent.replace('//!ci-no-touch', '');
|
18
|
-
writeFileSync(JSONFileName, updatedContent, "utf8");
|
19
|
-
execSync("git config pull.rebase false");
|
20
|
-
execSync("git pull");
|
21
|
-
execSync("git commit -a -m \"" + "remove //!ci-no-touch" + "\"");
|
22
|
-
execSync("git push -f");
|
23
|
-
console.log("Pushed to GitHub.");
|
24
17
|
console.log('I won\'t touch this. Exiting process.');
|
25
18
|
process.exit(0);
|
26
19
|
}
|
package/Update.json
CHANGED
@@ -2179,6 +2179,79 @@
|
|
2179
2179
|
}
|
2180
2180
|
],
|
2181
2181
|
"Notes": "No release notes were provided for this release."
|
2182
|
+
},
|
2183
|
+
"1.2.40": {
|
2184
|
+
"UpdateDate": 1723095733498,
|
2185
|
+
"Prerelease": true,
|
2186
|
+
"UpdateContents": [
|
2187
|
+
{
|
2188
|
+
"PR": 659,
|
2189
|
+
"Description": "new toolbar item"
|
2190
|
+
}
|
2191
|
+
],
|
2192
|
+
"Notes": "No release notes were provided for this release."
|
2193
|
+
},
|
2194
|
+
"1.2.41": {
|
2195
|
+
"UpdateDate": 1723095901881,
|
2196
|
+
"Prerelease": false,
|
2197
|
+
"UpdateContents": [
|
2198
|
+
{
|
2199
|
+
"PR": 639,
|
2200
|
+
"Description": "Restore License"
|
2201
|
+
},
|
2202
|
+
{
|
2203
|
+
"PR": 642,
|
2204
|
+
"Description": "freopen检测优化 (by zhouyiqing)"
|
2205
|
+
},
|
2206
|
+
{
|
2207
|
+
"PR": 644,
|
2208
|
+
"Description": "Better error Reporting"
|
2209
|
+
},
|
2210
|
+
{
|
2211
|
+
"PR": 645,
|
2212
|
+
"Description": "Codemirror for freopen"
|
2213
|
+
},
|
2214
|
+
{
|
2215
|
+
"PR": 648,
|
2216
|
+
"Description": "format freopen statement"
|
2217
|
+
},
|
2218
|
+
{
|
2219
|
+
"PR": 651,
|
2220
|
+
"Description": "prevent RE"
|
2221
|
+
},
|
2222
|
+
{
|
2223
|
+
"PR": 653,
|
2224
|
+
"Description": "Update a number of names"
|
2225
|
+
},
|
2226
|
+
{
|
2227
|
+
"PR": 655,
|
2228
|
+
"Description": "Prevent RE"
|
2229
|
+
},
|
2230
|
+
{
|
2231
|
+
"PR": 657,
|
2232
|
+
"Description": "log Success"
|
2233
|
+
},
|
2234
|
+
{
|
2235
|
+
"PR": 658,
|
2236
|
+
"Description": "error reporting for image upload"
|
2237
|
+
},
|
2238
|
+
{
|
2239
|
+
"PR": 659,
|
2240
|
+
"Description": "new toolbar item"
|
2241
|
+
}
|
2242
|
+
],
|
2243
|
+
"Notes": "minor release.<br>Enjoy!😀"
|
2244
|
+
},
|
2245
|
+
"1.2.42": {
|
2246
|
+
"UpdateDate": 1723096626205,
|
2247
|
+
"Prerelease": true,
|
2248
|
+
"UpdateContents": [
|
2249
|
+
{
|
2250
|
+
"PR": 663,
|
2251
|
+
"Description": "Do we really need this?"
|
2252
|
+
}
|
2253
|
+
],
|
2254
|
+
"Notes": "No release notes were provided for this release."
|
2182
2255
|
}
|
2183
2256
|
}
|
2184
2257
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.2.
|
3
|
+
// @version 1.2.42
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -50,7 +50,7 @@ let PurifyHTML = (Input) => {
|
|
50
50
|
} catch (e) {
|
51
51
|
console.error(e);
|
52
52
|
if (UtilityEnabled("DebugMode")) {
|
53
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
53
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
54
54
|
}
|
55
55
|
}
|
56
56
|
}
|
@@ -84,7 +84,7 @@ let GetRelativeTime = (Input) => {
|
|
84
84
|
} catch (e) {
|
85
85
|
console.error(e);
|
86
86
|
if (UtilityEnabled("DebugMode")) {
|
87
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
87
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
88
88
|
}
|
89
89
|
}
|
90
90
|
};
|
@@ -113,7 +113,7 @@ let RenderMathJax = async () => {
|
|
113
113
|
} catch (e) {
|
114
114
|
console.error(e);
|
115
115
|
if (UtilityEnabled("DebugMode")) {
|
116
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
116
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
117
117
|
}
|
118
118
|
}
|
119
119
|
};
|
@@ -150,7 +150,7 @@ let GetUserInfo = async (Username) => {
|
|
150
150
|
} catch (e) {
|
151
151
|
console.error(e);
|
152
152
|
if (UtilityEnabled("DebugMode")) {
|
153
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
153
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
154
154
|
}
|
155
155
|
}
|
156
156
|
};
|
@@ -198,7 +198,7 @@ let GetUserBadge = async (Username) => {
|
|
198
198
|
} catch (e) {
|
199
199
|
console.error(e);
|
200
200
|
if (UtilityEnabled("DebugMode")) {
|
201
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
201
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
202
202
|
}
|
203
203
|
}
|
204
204
|
};
|
@@ -272,7 +272,7 @@ let GetUsernameHTML = async (Element, Username, Simple = false, Href = "https://
|
|
272
272
|
} catch (e) {
|
273
273
|
console.error(e);
|
274
274
|
if (UtilityEnabled("DebugMode")) {
|
275
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
275
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
276
276
|
}
|
277
277
|
}
|
278
278
|
};
|
@@ -290,7 +290,7 @@ let SecondsToString = (InputSeconds) => {
|
|
290
290
|
} catch (e) {
|
291
291
|
console.error(e);
|
292
292
|
if (UtilityEnabled("DebugMode")) {
|
293
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
293
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
294
294
|
}
|
295
295
|
}
|
296
296
|
}
|
@@ -306,7 +306,7 @@ let StringToSeconds = (InputString) => {
|
|
306
306
|
} catch (e) {
|
307
307
|
console.error(e);
|
308
308
|
if (UtilityEnabled("DebugMode")) {
|
309
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
309
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
310
310
|
}
|
311
311
|
}
|
312
312
|
}
|
@@ -333,7 +333,7 @@ let SizeToStringSize = (Memory) => {
|
|
333
333
|
} catch (e) {
|
334
334
|
console.error(e);
|
335
335
|
if (UtilityEnabled("DebugMode")) {
|
336
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
336
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
337
337
|
}
|
338
338
|
}
|
339
339
|
};
|
@@ -356,7 +356,7 @@ let TimeToStringTime = (Time) => {
|
|
356
356
|
} catch (e) {
|
357
357
|
console.error(e);
|
358
358
|
if (UtilityEnabled("DebugMode")) {
|
359
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
359
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
360
360
|
}
|
361
361
|
}
|
362
362
|
};
|
@@ -373,7 +373,7 @@ let TidyTable = (Table) => {
|
|
373
373
|
} catch (e) {
|
374
374
|
console.error(e);
|
375
375
|
if (UtilityEnabled("DebugMode")) {
|
376
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
376
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
377
377
|
}
|
378
378
|
}
|
379
379
|
};
|
@@ -387,7 +387,7 @@ let UtilityEnabled = (Name) => {
|
|
387
387
|
} catch (e) {
|
388
388
|
console.error(e);
|
389
389
|
if (UtilityEnabled("DebugMode")) {
|
390
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
390
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
391
391
|
}
|
392
392
|
}
|
393
393
|
};
|
@@ -433,7 +433,7 @@ let RequestAPI = (Action, Data, CallBack) => {
|
|
433
433
|
} catch (e) {
|
434
434
|
console.error(e);
|
435
435
|
if (UtilityEnabled("DebugMode")) {
|
436
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
436
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
437
437
|
}
|
438
438
|
}
|
439
439
|
};
|
@@ -480,7 +480,7 @@ class NavbarStyler {
|
|
480
480
|
} catch (e) {
|
481
481
|
console.error(e);
|
482
482
|
if (UtilityEnabled("DebugMode")) {
|
483
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
483
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
484
484
|
}
|
485
485
|
}
|
486
486
|
}
|
@@ -495,7 +495,7 @@ class NavbarStyler {
|
|
495
495
|
} catch (e) {
|
496
496
|
console.error(e);
|
497
497
|
if (UtilityEnabled("DebugMode")) {
|
498
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
498
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
499
499
|
}
|
500
500
|
}
|
501
501
|
}
|
@@ -516,7 +516,7 @@ class NavbarStyler {
|
|
516
516
|
} catch (e) {
|
517
517
|
console.error(e);
|
518
518
|
if (UtilityEnabled("DebugMode")) {
|
519
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
519
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
520
520
|
}
|
521
521
|
}
|
522
522
|
}
|
@@ -543,7 +543,7 @@ class NavbarStyler {
|
|
543
543
|
} catch (e) {
|
544
544
|
console.error(e);
|
545
545
|
if (UtilityEnabled("DebugMode")) {
|
546
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
546
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
547
547
|
}
|
548
548
|
}
|
549
549
|
}
|
@@ -561,7 +561,7 @@ class NavbarStyler {
|
|
561
561
|
} catch (e) {
|
562
562
|
console.error(e);
|
563
563
|
if (UtilityEnabled("DebugMode")) {
|
564
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
564
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
565
565
|
}
|
566
566
|
}
|
567
567
|
}
|
@@ -590,7 +590,7 @@ class NavbarStyler {
|
|
590
590
|
} catch (e) {
|
591
591
|
console.error(e);
|
592
592
|
if (UtilityEnabled("DebugMode")) {
|
593
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
593
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
594
594
|
}
|
595
595
|
}
|
596
596
|
}
|
@@ -884,6 +884,7 @@ async function main() {
|
|
884
884
|
<li class="dropdown-item">个人中心</li>
|
885
885
|
<li class="dropdown-item">短消息</li>
|
886
886
|
<li class="dropdown-item">插件设置</li>
|
887
|
+
<li class="dropdown-item">插件更新日志</li>
|
887
888
|
<li class="dropdown-item">注销</li>`;
|
888
889
|
PopupUL.children[0].addEventListener("click", () => {
|
889
890
|
location.href = "https://www.xmoj.tech/modifypage.php";
|
@@ -898,6 +899,9 @@ async function main() {
|
|
898
899
|
location.href = "https://www.xmoj.tech/index.php?ByUserScript=1";
|
899
900
|
});
|
900
901
|
PopupUL.children[4].addEventListener("click", () => {
|
902
|
+
location.href = "https://www.xmoj.tech/modifypage.php?ByUserScript=1";
|
903
|
+
});
|
904
|
+
PopupUL.children[5].addEventListener("click", () => {
|
901
905
|
localStorage.removeItem("UserScript-Username");
|
902
906
|
localStorage.removeItem("UserScript-Password");
|
903
907
|
location.href = "https://www.xmoj.tech/logout.php";
|
@@ -1308,13 +1312,8 @@ async function main() {
|
|
1308
1312
|
"ID": "ACMRank", "Type": "A", "Name": "比赛ACM排名,并且能下载ACM排名"
|
1309
1313
|
}, {"ID": "Discussion", "Type": "F", "Name": "恢复讨论与短消息功能"}, {
|
1310
1314
|
"ID": "MoreSTD", "Type": "F", "Name": "查看到更多标程"
|
1311
|
-
}, {
|
1312
|
-
"ID": "
|
1313
|
-
"Type": "A",
|
1314
|
-
"Name": "学术模式",
|
1315
|
-
"Children": [{"ID": "ApplyData", "Type": "A", "Name": "获取数据功能"}, {
|
1316
|
-
"ID": "AutoCheat", "Type": "A", "Name": "自动提交当年代码"
|
1317
|
-
}]
|
1315
|
+
}, {"ID": "ApplyData", "Type": "A", "Name": "获取数据功能"}, {
|
1316
|
+
"ID": "AutoCheat", "Type": "A", "Name": "自动提交当年代码"
|
1318
1317
|
}, {"ID": "Rating", "Type": "A", "Name": "添加用户评分和用户名颜色"}, {
|
1319
1318
|
"ID": "AutoRefresh", "Type": "A", "Name": "比赛列表、比赛排名界面自动刷新"
|
1320
1319
|
}, {
|
@@ -5045,7 +5044,7 @@ int main()
|
|
5045
5044
|
} catch (e) {
|
5046
5045
|
console.error(e);
|
5047
5046
|
if (UtilityEnabled("DebugMode")) {
|
5048
|
-
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\n\n Don't want to see this message? Disable DebugMode.");
|
5047
|
+
alert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\n Don't want to see this message? Disable DebugMode.");
|
5049
5048
|
}
|
5050
5049
|
}
|
5051
5050
|
}
|