xmoj-script 1.2.58 → 1.2.61
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/main.yml +25 -0
- package/Update.json +57 -0
- package/XMOJ.user.js +24 -14
- package/package.json +1 -1
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Qodana
|
2
|
+
on:
|
3
|
+
workflow_dispatch:
|
4
|
+
pull_request:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- master
|
8
|
+
- dev
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
qodana:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
permissions:
|
14
|
+
contents: write
|
15
|
+
pull-requests: write
|
16
|
+
checks: write
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v3
|
19
|
+
with:
|
20
|
+
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
|
21
|
+
fetch-depth: 0 # a full history is required for pull request analysis
|
22
|
+
- name: 'Qodana Scan'
|
23
|
+
uses: JetBrains/qodana-action@v2024.1
|
24
|
+
env:
|
25
|
+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
package/Update.json
CHANGED
@@ -2464,6 +2464,63 @@
|
|
2464
2464
|
}
|
2465
2465
|
],
|
2466
2466
|
"Notes": "No release notes were provided for this release."
|
2467
|
+
},
|
2468
|
+
"1.2.59": {
|
2469
|
+
"UpdateDate": 1724836147641,
|
2470
|
+
"Prerelease": true,
|
2471
|
+
"UpdateContents": [
|
2472
|
+
{
|
2473
|
+
"PR": 718,
|
2474
|
+
"Description": "Prevent caching"
|
2475
|
+
}
|
2476
|
+
],
|
2477
|
+
"Notes": "No release notes were provided for this release."
|
2478
|
+
},
|
2479
|
+
"1.2.60": {
|
2480
|
+
"UpdateDate": 1725005372794,
|
2481
|
+
"Prerelease": false,
|
2482
|
+
"UpdateContents": [
|
2483
|
+
{
|
2484
|
+
"PR": 690,
|
2485
|
+
"Description": "移除之前忘记操作的admin"
|
2486
|
+
},
|
2487
|
+
{
|
2488
|
+
"PR": 694,
|
2489
|
+
"Description": "更新support url"
|
2490
|
+
},
|
2491
|
+
{
|
2492
|
+
"PR": 698,
|
2493
|
+
"Description": "Set turnstile theme and language"
|
2494
|
+
},
|
2495
|
+
{
|
2496
|
+
"PR": 704,
|
2497
|
+
"Description": "登录界面优化"
|
2498
|
+
},
|
2499
|
+
{
|
2500
|
+
"PR": 712,
|
2501
|
+
"Description": "更改个人中心一栏鼠标指针样式"
|
2502
|
+
},
|
2503
|
+
{
|
2504
|
+
"PR": 715,
|
2505
|
+
"Description": "更改短消息显示"
|
2506
|
+
},
|
2507
|
+
{
|
2508
|
+
"PR": 718,
|
2509
|
+
"Description": "Prevent caching"
|
2510
|
+
}
|
2511
|
+
],
|
2512
|
+
"Notes": "No release notes were provided for this release."
|
2513
|
+
},
|
2514
|
+
"1.2.61": {
|
2515
|
+
"UpdateDate": 1725083743111,
|
2516
|
+
"Prerelease": true,
|
2517
|
+
"UpdateContents": [
|
2518
|
+
{
|
2519
|
+
"PR": 725,
|
2520
|
+
"Description": "Add CP Editor"
|
2521
|
+
}
|
2522
|
+
],
|
2523
|
+
"Notes": "No release notes were provided for this release."
|
2467
2524
|
}
|
2468
2525
|
}
|
2469
2526
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.2.
|
3
|
+
// @version 1.2.61
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -416,7 +416,8 @@ let RequestAPI = (Action, Data, CallBack) => {
|
|
416
416
|
method: "POST",
|
417
417
|
url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/" : "https://api.xmoj-bbs.me/") + Action,
|
418
418
|
headers: {
|
419
|
-
"Content-Type": "application/json"
|
419
|
+
"Content-Type": "application/json",
|
420
|
+
"Cache-Control": "no-cache"
|
420
421
|
},
|
421
422
|
data: DataString,
|
422
423
|
onload: (Response) => {
|
@@ -598,9 +599,11 @@ class NavbarStyler {
|
|
598
599
|
}
|
599
600
|
}
|
600
601
|
}
|
601
|
-
|
602
|
-
|
602
|
+
|
603
|
+
function replaceMarkdownImages(text, string) {
|
604
|
+
return text.replace(/!\[.*?\]\(.*?\)/g, string);
|
603
605
|
}
|
606
|
+
|
604
607
|
async function main() {
|
605
608
|
try {
|
606
609
|
if (location.href.startsWith('http://')) {
|
@@ -880,15 +883,18 @@ async function main() {
|
|
880
883
|
}
|
881
884
|
if (UtilityEnabled("ResetType")) {
|
882
885
|
if (document.querySelector("#profile") != undefined && document.querySelector("#profile").innerHTML == "登录") {
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
886
|
+
let PopupUL = document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul");
|
887
|
+
PopupUL.innerHTML = `<li class="dropdown-item">登录</li>`;
|
888
|
+
PopupUL.children[0].addEventListener("click", () => {
|
889
|
+
location.href = "https://www.xmoj.tech/loginpage.php";
|
890
|
+
});
|
891
|
+
let parentLi = document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li");
|
892
|
+
document.addEventListener("click", (event) => {
|
893
|
+
if (!parentLi.contains(event.target) && PopupUL.style.display === 'block') {
|
894
|
+
hideDropdownItems();
|
895
|
+
}
|
896
|
+
});
|
897
|
+
} else if (document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul > li:nth-child(3) > a > span") != undefined && document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul > li:nth-child(3) > a > span").innerText != "个人中心") {
|
892
898
|
let PopupUL = document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul");
|
893
899
|
PopupUL.style.cursor = 'pointer';
|
894
900
|
PopupUL.innerHTML = `<li class="dropdown-item">修改帐号</li>
|
@@ -3852,6 +3858,10 @@ int main()
|
|
3852
3858
|
"Name": "RedPanda C++",
|
3853
3859
|
"Image": "https://a.fsdn.com/allura/p/redpanda-cpp/icon",
|
3854
3860
|
"URL": "https://sourceforge.net/projects/redpanda-cpp/"
|
3861
|
+
}, {
|
3862
|
+
"Name": "CP Editor",
|
3863
|
+
"Image": "https://a.fsdn.com/allura/mirror/cp-editor/icon?c35437565079e4135a985ba557ef2fdbe97de6bafb27aceafd76bc54490c26e3?&w=90",
|
3864
|
+
"URL": "https://cpeditor.org/zh/download/"
|
3855
3865
|
}, {
|
3856
3866
|
"Name": "CLion",
|
3857
3867
|
"Image": "https://resources.jetbrains.com/storage/products/company/brand/logos/CLion_icon.png",
|
@@ -4149,7 +4159,7 @@ int main()
|
|
4149
4159
|
}
|
4150
4160
|
let LastsMessageCell = document.createElement("td");
|
4151
4161
|
Row.appendChild(LastsMessageCell);
|
4152
|
-
LastsMessageCell.innerText = replaceMarkdownImages(Data[i].LastsMessage,'[image]');
|
4162
|
+
LastsMessageCell.innerText = replaceMarkdownImages(Data[i].LastsMessage, '[image]');
|
4153
4163
|
let SendTimeCell = document.createElement("td");
|
4154
4164
|
Row.appendChild(SendTimeCell);
|
4155
4165
|
SendTimeCell.innerHTML = GetRelativeTime(Data[i].SendTime);
|