xmoj-script 1.1.41 → 1.1.43

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,40 +1,45 @@
1
- name: Generate sitemap
1
+ name: Generate xml sitemap
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches: [ dev ]
6
-
7
6
  jobs:
8
- sitemap_job:
7
+ UpdateVersion:
8
+ permissions:
9
+ contents: write
9
10
  runs-on: ubuntu-latest
10
11
  name: Generate a sitemap
11
12
  steps:
12
13
  - name: Checkout the repo
13
- uses: actions/checkout@v4
14
+ uses: actions/checkout@v2
14
15
  with:
15
- fetch-depth: 0
16
-
17
- - name: Generate the sitemap
16
+ fetch-depth: 0
17
+ - name: Generate new sitemap
18
18
  id: sitemap
19
- uses: cicirello/generate-sitemap@v1
19
+ uses: cicirello/generate-sitemap@v1.6.1
20
20
  with:
21
- exclude-paths: /404.html
21
+ additional-extensions: user.js
22
+ sitemap-format: xml
23
+ drop-html-extension: true
22
24
  base-url-path: https://xmoj-bbs.tech/
23
-
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
+
24
36
  - name: Output stats
25
37
  run: |
26
38
  echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
27
39
  echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
28
40
  echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
29
-
30
- - name: Create Pull Request
31
- uses: peter-evans/create-pull-request@v5.0.2
32
- with:
33
- title: "Automated sitemap update"
34
- body: >
35
- Automated changes in sitemap.xml.
36
- commit-message: "Automated sitemap update."
37
- author: PythonSmall-Q <seanoj_noreply@yeah.net>
38
- committer: PythonSmall-Q <seanoj_noreply@yeah.net>
39
- branch: create-pull-request/sitemap
40
- delete-branch: true
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
@@ -1257,7 +1257,7 @@
1257
1257
  },
1258
1258
  "1.1.41": {
1259
1259
  "UpdateDate": 1706867272746,
1260
- "Prerelease": true,
1260
+ "Prerelease": false,
1261
1261
  "UpdateContents": [
1262
1262
  {
1263
1263
  "PR": 429,
@@ -1265,6 +1265,28 @@
1265
1265
  }
1266
1266
  ],
1267
1267
  "Notes": "No release notes were provided for this release."
1268
+ },
1269
+ "1.1.42": {
1270
+ "UpdateDate": 1707642572244,
1271
+ "Prerelease": true,
1272
+ "UpdateContents": [
1273
+ {
1274
+ "PR": 445,
1275
+ "Description": "fix [Bug] 右上角用户名点击后无反应 "
1276
+ }
1277
+ ],
1278
+ "Notes": "Popper.js is so stupid..."
1279
+ },
1280
+ "1.1.43": {
1281
+ "UpdateDate": 1707715028113,
1282
+ "Prerelease": true,
1283
+ "UpdateContents": [
1284
+ {
1285
+ "PR": 447,
1286
+ "Description": "fix the unpkg-cdn option"
1287
+ }
1288
+ ],
1289
+ "Notes": "No release notes were provided for this release."
1268
1290
  }
1269
1291
  }
1270
1292
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.41
3
+ // @version 1.1.43
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -402,6 +402,7 @@ let ServerURL = (UtilityEnabled("DebugMode") ? "https://ghpages.xmoj-bbs.tech/"
402
402
  let CurrentUsername = document.querySelector("#profile").innerText;
403
403
  CurrentUsername = CurrentUsername.replaceAll(/[^a-zA-Z0-9]/g, "");
404
404
  let IsAdmin = AdminUserList.indexOf(CurrentUsername) !== -1;
405
+
405
406
  async function main() {
406
407
  if (location.href.startsWith('http://')) {
407
408
  //use https
@@ -488,11 +489,6 @@ async function main() {
488
489
  document.querySelector("html").setAttribute("data-bs-theme", "light");
489
490
  }
490
491
  var resources = [
491
- {
492
- type: 'script',
493
- src: 'https://cdn.bootcdn.net/ajax/libs/popper.js/2.11.7/umd/popper.min.js',
494
- isModule: true
495
- },
496
492
  {
497
493
  type: 'link',
498
494
  href: 'https://cdn.bootcdn.net/ajax/libs/codemirror/6.65.7/codemirror.min.css',
@@ -515,13 +511,13 @@ async function main() {
515
511
  },
516
512
  {
517
513
  type: 'script',
518
- src: 'https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0-alpha3/js/bootstrap.min.js',
514
+ src: 'https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0-alpha3/js/bootstrap.bundle.min.js',
519
515
  isModule: true
520
516
  }
521
517
  ];
522
518
  if (UtilityEnabled("UnpkgCdn")) {
523
- resources[0].src = 'https://unpkg.com/@popperjs/core@2.11.8/dist/umd/popper.min.js';
524
- resources[4].href = 'https://unpkg.com/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css';
519
+ resources[3].href = 'https://unpkg.com/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css';
520
+ resources[4].src = 'https://unpkg.com/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js';
525
521
  }
526
522
  let loadResources = async () => {
527
523
  let promises = resources.map(resource => {
package/index.html CHANGED
@@ -3,6 +3,8 @@
3
3
  <link rel="icon" href="favicon.ico">
4
4
 
5
5
  <head>
6
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6214673028530012"
7
+ crossorigin="anonymous"></script>
6
8
  <meta name="viewport" content="width=device-width">
7
9
  <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.min.css" rel="stylesheet">
8
10
  <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/js/bootstrap.min.js"></script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.41",
3
+ "version": "1.1.43",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {