xmoj-script 1.1.6 → 1.1.8
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
@@ -750,6 +750,56 @@
|
|
750
750
|
}
|
751
751
|
],
|
752
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> 这个算公告吗?@<a href=\"https://www.xmoj.tech/userinfo.php?user=chenlangning\" class=\"link-offset-2 link-underline-opacity-50 link-danger\" ;\"=\"\">chenlangning</a>"
|
764
|
+
},
|
765
|
+
"1.1.8": {
|
766
|
+
"UpdateDate": 1703253440322,
|
767
|
+
"Prerelease": false,
|
768
|
+
"UpdateContents": [
|
769
|
+
{
|
770
|
+
"PR": 300,
|
771
|
+
"Description": "Add Docs"
|
772
|
+
},
|
773
|
+
{
|
774
|
+
"PR": 300,
|
775
|
+
"Description": "Add Docs"
|
776
|
+
},
|
777
|
+
{
|
778
|
+
"PR": 301,
|
779
|
+
"Description": "改变更新架构"
|
780
|
+
},
|
781
|
+
{
|
782
|
+
"PR": 302,
|
783
|
+
"Description": "Update allowed tags in PurifyHTML function to allow the tag"
|
784
|
+
},
|
785
|
+
{
|
786
|
+
"PR": 305,
|
787
|
+
"Description": "add release notes (#303)"
|
788
|
+
},
|
789
|
+
{
|
790
|
+
"PR": 310,
|
791
|
+
"Description": "Add an Easter egg"
|
792
|
+
},
|
793
|
+
{
|
794
|
+
"PR": 312,
|
795
|
+
"Description": "fix release notes"
|
796
|
+
},
|
797
|
+
{
|
798
|
+
"PR": 315,
|
799
|
+
"Description": "修复无法在某些页面检查登录状态"
|
800
|
+
}
|
801
|
+
],
|
802
|
+
"Notes": "No release notes were provided for this release."
|
753
803
|
}
|
754
804
|
}
|
755
805
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.1.
|
3
|
+
// @version 1.1.8
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -37,7 +37,7 @@ const AdminUserList = ["zhuchenrui2", "shanwenxiao", "admin", "shihongxi"];
|
|
37
37
|
|
38
38
|
let PurifyHTML = (Input) => {
|
39
39
|
return DOMPurify.sanitize(Input, {
|
40
|
-
"ALLOWED_TAGS": ["a", "b", "
|
40
|
+
"ALLOWED_TAGS": ["a", "b", "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"],
|
41
41
|
"ALLOWED_ATTR": ["abbr", "accept", "accept-charset", "accesskey", "action", "align", "alt", "axis", "border", "cellpadding", "cellspacing", "char", "charoff", "charset", "checked", "cite", "clear", "color", "cols", "colspan", "compact", "coords", "datetime", "dir", "disabled", "enctype", "for", "frame", "headers", "height", "href", "hreflang", "hspace", "ismap", "itemprop", "label", "lang", "longdesc", "maxlength", "media", "method", "multiple", "name", "nohref", "noshade", "nowrap", "prompt", "readonly", "rel", "rev", "rows", "rowspan", "rules", "scope", "selected", "shape", "size", "span", "src", "start", "summary", "tabindex", "target", "title", "type", "usemap", "valign", "value", "vspace", "width"]
|
42
42
|
});
|
43
43
|
}
|
@@ -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;
|