xmoj-script 1.1.54 → 1.1.56

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.
@@ -1,45 +1,45 @@
1
- name: Generate xml sitemap
1
+ # name: Generate xml sitemap
2
2
 
3
- on:
4
- push:
5
- branches: [ dev ]
6
- jobs:
7
- UpdateVersion:
8
- permissions:
9
- contents: write
10
- runs-on: ubuntu-latest
11
- name: Generate a sitemap
12
- steps:
13
- - name: Checkout the repo
14
- uses: actions/checkout@v2
15
- with:
16
- fetch-depth: 0
17
- - name: Generate new sitemap
18
- id: sitemap
19
- uses: cicirello/generate-sitemap@v1.10.0
20
- with:
21
- additional-extensions: user.js
22
- sitemap-format: xml
23
- drop-html-extension: true
24
- base-url-path: https://xmoj-bbs.tech/
25
- exclude-paths: /404.html
26
- - name: Create PR to dev branch
27
- uses: peter-evans/create-pull-request@v6
28
- with:
29
- # signoff: true
30
- reviewers: PythonSmall-Q, zhouyiqing0304
31
- assignees: PythonSmall-Q, zhouyiqing0304
32
- title: "自动更新sitemap"
33
- body: >
34
- Sitemap Updated! Please merge me!.
3
+ # on:
4
+ # push:
5
+ # branches: [ dev ]
6
+ # jobs:
7
+ # UpdateVersion:
8
+ # permissions:
9
+ # contents: write
10
+ # runs-on: ubuntu-latest
11
+ # name: Generate a sitemap
12
+ # steps:
13
+ # - name: Checkout the repo
14
+ # uses: actions/checkout@v2
15
+ # with:
16
+ # fetch-depth: 0
17
+ # - name: Generate new sitemap
18
+ # id: sitemap
19
+ # uses: cicirello/generate-sitemap@v1.10.0
20
+ # with:
21
+ # additional-extensions: user.js
22
+ # sitemap-format: xml
23
+ # drop-html-extension: true
24
+ # base-url-path: https://xmoj-bbs.tech/
25
+ # exclude-paths: /404.html
26
+ # - name: Create PR to dev branch
27
+ # uses: peter-evans/create-pull-request@v6
28
+ # with:
29
+ # # signoff: true
30
+ # reviewers: PythonSmall-Q, zhouyiqing0304
31
+ # assignees: PythonSmall-Q, zhouyiqing0304
32
+ # title: "自动更新sitemap"
33
+ # body: >
34
+ # Sitemap Updated! Please merge me!.
35
35
 
36
- - name: Output stats
37
- run: |
38
- echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
39
- echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
40
- echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
41
- - name: Check outputs
42
- if: ${{ steps.cpr.outputs.pull-request-number }}
43
- run: |
44
- echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
45
- echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
36
+ # - name: Output stats
37
+ # run: |
38
+ # echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
39
+ # echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
40
+ # echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
41
+ # - name: Check outputs
42
+ # if: ${{ steps.cpr.outputs.pull-request-number }}
43
+ # run: |
44
+ # echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
45
+ # echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
package/Update.json CHANGED
@@ -1417,6 +1417,28 @@
1417
1417
  }
1418
1418
  ],
1419
1419
  "Notes": "No release notes were provided for this release."
1420
+ },
1421
+ "1.1.55": {
1422
+ "UpdateDate": 1712411916005,
1423
+ "Prerelease": true,
1424
+ "UpdateContents": [
1425
+ {
1426
+ "PR": 499,
1427
+ "Description": "add markdown support to short messages "
1428
+ }
1429
+ ],
1430
+ "Notes": "No release notes were provided for this release."
1431
+ },
1432
+ "1.1.56": {
1433
+ "UpdateDate": 1713525771039,
1434
+ "Prerelease": true,
1435
+ "UpdateContents": [
1436
+ {
1437
+ "PR": 505,
1438
+ "Description": "让 ctrl + enter 触发自动提交当年代码"
1439
+ }
1440
+ ],
1441
+ "Notes": "No release notes were provided for this release."
1420
1442
  }
1421
1443
  }
1422
1444
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.54
3
+ // @version 1.1.56
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -1842,8 +1842,12 @@ async function main() {
1842
1842
  AutoCheatButton.disabled = false;
1843
1843
  if (Submitted) location.reload(); else AutoCheatButton.innerHTML = "自动提交当年代码";
1844
1844
  });
1845
+ document.addEventListener("keydown", (Event) => {
1846
+ if (Event.code === 'Enter' && Event.ctrlKey) {
1847
+ AutoCheatButton.click();
1848
+ }
1849
+ });
1845
1850
  }
1846
-
1847
1851
  if (UtilityEnabled("OpenAllProblem")) {
1848
1852
  let OpenAllButton = document.createElement("button");
1849
1853
  OpenAllButton.className = "btn btn-outline-secondary";
@@ -3745,7 +3749,7 @@ int main()
3745
3749
  ContentDiv.style.maxHeight = "500px";
3746
3750
  ContentDiv.style.overflowX = "auto";
3747
3751
  ContentDiv.style.overflowY = "auto";
3748
- ContentDiv.innerHTML = PurifyHTML(Data[i].Content);
3752
+ ContentDiv.innerHTML = PurifyHTML(marked.parse(Data[i].Content));
3749
3753
  let mediaElements = ContentDiv.querySelectorAll('img, video');
3750
3754
  for (let media of mediaElements) {
3751
3755
  media.style.objectFit = 'contain';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.54",
3
+ "version": "1.1.56",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {