xmoj-script 1.1.5 → 1.1.7
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.
@@ -20,10 +20,10 @@ jobs:
|
|
20
20
|
fail-fast: false
|
21
21
|
steps:
|
22
22
|
- uses: actions/checkout@v4
|
23
|
-
- uses: github/codeql-action/init@
|
23
|
+
- uses: github/codeql-action/init@v3
|
24
24
|
with:
|
25
25
|
languages: "javascript"
|
26
|
-
- uses: github/codeql-action/autobuild@
|
27
|
-
- uses: github/codeql-action/analyze@
|
26
|
+
- uses: github/codeql-action/autobuild@v3
|
27
|
+
- uses: github/codeql-action/analyze@v3
|
28
28
|
with:
|
29
29
|
category: "/language:javascript"
|
@@ -17,7 +17,7 @@ jobs:
|
|
17
17
|
with:
|
18
18
|
app-id: ${{ secrets.APP_ID }}
|
19
19
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
20
|
-
- uses: actions/setup-node@
|
20
|
+
- uses: actions/setup-node@v4
|
21
21
|
with:
|
22
22
|
node-version: 16
|
23
23
|
registry-url: https://registry.npmjs.org/
|
@@ -25,7 +25,7 @@ jobs:
|
|
25
25
|
with:
|
26
26
|
fetch-depth: 0
|
27
27
|
- name: Publish to npm
|
28
|
-
run: npm publish
|
28
|
+
run: npm publish --provenance
|
29
29
|
env:
|
30
30
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
31
31
|
- name: Get version
|
@@ -16,7 +16,7 @@ jobs:
|
|
16
16
|
with:
|
17
17
|
app-id: ${{ secrets.APP_ID }}
|
18
18
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
19
|
-
- uses: actions/setup-node@
|
19
|
+
- uses: actions/setup-node@v4
|
20
20
|
with:
|
21
21
|
node-version: 16
|
22
22
|
registry-url: https://registry.npmjs.org/
|
@@ -24,7 +24,7 @@ jobs:
|
|
24
24
|
with:
|
25
25
|
fetch-depth: 0
|
26
26
|
- name: Publish to npm
|
27
|
-
run: npm publish
|
27
|
+
run: npm publish --provenance
|
28
28
|
env:
|
29
29
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
30
30
|
- name: Get version
|
package/Update.json
CHANGED
@@ -739,6 +739,28 @@
|
|
739
739
|
}
|
740
740
|
],
|
741
741
|
"Notes": "No release notes were provided for this release."
|
742
|
+
},
|
743
|
+
"1.1.6": {
|
744
|
+
"UpdateDate": 1702995326126,
|
745
|
+
"Prerelease": true,
|
746
|
+
"UpdateContents": [
|
747
|
+
{
|
748
|
+
"PR": 312,
|
749
|
+
"Description": "fix release notes"
|
750
|
+
}
|
751
|
+
],
|
752
|
+
"Notes": "Welcome!"
|
753
|
+
},
|
754
|
+
"1.1.7": {
|
755
|
+
"UpdateDate": 1703253098623,
|
756
|
+
"Prerelease": true,
|
757
|
+
"UpdateContents": [
|
758
|
+
{
|
759
|
+
"PR": 315,
|
760
|
+
"Description": "修复无法在某些页面检查登录状态"
|
761
|
+
}
|
762
|
+
],
|
763
|
+
"Notes": "<big>test:</big> 这个算release notes吗?<a href=\"https://www.xmoj.tech/userinfo.php?user=chenlangning\" class=\"link-offset-2 link-underline-opacity-50 link-danger\" ;\"=\"\">chenlangning</a>"
|
742
764
|
}
|
743
765
|
}
|
744
766
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.1.
|
3
|
+
// @version 1.1.7
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -384,6 +384,12 @@ GM_registerMenuCommand("重置数据", () => {
|
|
384
384
|
}
|
385
385
|
});
|
386
386
|
|
387
|
+
//otherwise CurrentUsername might be undefined
|
388
|
+
if (UtilityEnabled("AutoLogin") && document.querySelector("body > a:nth-child(1)") != null && document.querySelector("body > a:nth-child(1)").innerText == "请登录后继续操作") {
|
389
|
+
localStorage.setItem("UserScript-LastPage", location.pathname + location.search);
|
390
|
+
location.href = "https://www.xmoj.tech/loginpage.php";
|
391
|
+
}
|
392
|
+
|
387
393
|
let SearchParams = new URLSearchParams(location.search);
|
388
394
|
let ServerURL = (UtilityEnabled("DebugMode") ? "https://ghpages.xmoj-bbs.tech/" : "https://web.xmoj-bbs.tech")
|
389
395
|
let CurrentUsername = document.querySelector("#profile").innerText;
|
@@ -794,7 +800,7 @@ else {
|
|
794
800
|
UpdateDataCardText.className = "card-text";
|
795
801
|
//release notes
|
796
802
|
if (Data.Notes != undefined){
|
797
|
-
UpdateDataCardText.innerHTML = Data.
|
803
|
+
UpdateDataCardText.innerHTML = Data.Notes;
|
798
804
|
}
|
799
805
|
let UpdateDataCardList = document.createElement("ul"); UpdateDataCardText.appendChild(UpdateDataCardList);
|
800
806
|
UpdateDataCardList.className = "list-group list-group-flush";
|