xmoj-script 1.1.3 → 1.1.5

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.
@@ -43,7 +43,8 @@ console.log("Current version : " + CurrentVersion);
43
43
  JSONObject.UpdateHistory[CurrentVersion] = {
44
44
  "UpdateDate": Date.now(),
45
45
  "Prerelease": false,
46
- "UpdateContents": []
46
+ "UpdateContents": [],
47
+ "Notes": "No release notes were provided for this release."
47
48
  };
48
49
 
49
50
  for (var i = Object.keys(JSONObject.UpdateHistory).length - 2; i >= 0; i--) {
@@ -64,6 +65,7 @@ var NewJSFileContent = JSFileContent.replace(/@version(\s+)\d+\.\d+\.\d+/, "@ver
64
65
  writeFileSync(JSFileName, NewJSFileContent, "utf8");
65
66
  console.warn("XMOJ.user.js has been updated.");
66
67
 
68
+ execSync("git config pull.rebase false");
67
69
  execSync("git pull");
68
70
  execSync("git push origin --delete actions/temp || true");
69
71
  execSync("git checkout -b actions/temp");
@@ -67,7 +67,8 @@ else if (ChangedFileList.indexOf("XMOJ.user.js") == -1) {
67
67
  "UpdateContents": [{
68
68
  "PR": CurrentPR,
69
69
  "Description": CurrentDescription
70
- }]
70
+ }],
71
+ "Notes": "No release notes were provided for this release."
71
72
  };
72
73
  writeFileSync(JSFileName, JSFileContent.replace(/@version(\s+)\d+\.\d+\.\d+/, "@version$1" + CurrentVersion), "utf8");
73
74
  console.warn("XMOJ.user.js has been updated.");
@@ -79,6 +80,7 @@ writeFileSync(JSONFileName, JSON.stringify(JSONObject, null, 4), "utf8");
79
80
 
80
81
  console.warn("Update.json has been updated.");
81
82
 
83
+ execSync("git config pull.rebase false");
82
84
  execSync("git pull");
83
85
  execSync("git commit -a -m \"" + CommitMessage + "\"");
84
86
  execSync("git push -f");
package/Update.json CHANGED
@@ -717,6 +717,28 @@
717
717
  "Description": "Update allowed tags in PurifyHTML function to allow the tag"
718
718
  }
719
719
  ]
720
+ },
721
+ "1.1.4": {
722
+ "UpdateDate": 1702822514246,
723
+ "Prerelease": true,
724
+ "UpdateContents": [
725
+ {
726
+ "PR": 305,
727
+ "Description": "add release notes (#303)"
728
+ }
729
+ ],
730
+ "Notes": "Hello, release notes! test 测试"
731
+ },
732
+ "1.1.5": {
733
+ "UpdateDate": 1702993420758,
734
+ "Prerelease": true,
735
+ "UpdateContents": [
736
+ {
737
+ "PR": 310,
738
+ "Description": "Add an Easter egg"
739
+ }
740
+ ],
741
+ "Notes": "No release notes were provided for this release."
720
742
  }
721
743
  }
722
744
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.3
3
+ // @version 1.1.5
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -448,6 +448,7 @@ else {
448
448
  document.body.innerHTML = String(document.body.innerHTML).replaceAll("海上", "上海");
449
449
  document.body.innerHTML = String(document.body.innerHTML).replaceAll("小红", "徐师娘");
450
450
  document.body.innerHTML = String(document.body.innerHTML).replaceAll("小粉", "彩虹");
451
+ document.body.innerHTML = String(document.body.innerHTML).replaceAll("提交上节课的代码", "自动提交当年代码");
451
452
  document.body.innerHTML = String(document.body.innerHTML).replaceAll("高老师们", "我们");
452
453
  document.body.innerHTML = String(document.body.innerHTML).replaceAll("自高老师", "自我");
453
454
  document.title = String(document.title).replaceAll("小明", "高老师");
@@ -791,6 +792,10 @@ else {
791
792
  UpdateDataCardSubtitle.innerHTML = GetRelativeTime(Data.UpdateDate);
792
793
  let UpdateDataCardText = document.createElement("p"); UpdateDataCardBody.appendChild(UpdateDataCardText);
793
794
  UpdateDataCardText.className = "card-text";
795
+ //release notes
796
+ if (Data.Notes != undefined){
797
+ UpdateDataCardText.innerHTML = Data.ReleaseNotes;
798
+ }
794
799
  let UpdateDataCardList = document.createElement("ul"); UpdateDataCardText.appendChild(UpdateDataCardList);
795
800
  UpdateDataCardList.className = "list-group list-group-flush";
796
801
  for (let j = 0; j < Data.UpdateContents.length; j++) {
@@ -2475,6 +2480,10 @@ else {
2475
2480
  UpdateDataCardSubtitle.innerHTML = GetRelativeTime(Data.UpdateDate);
2476
2481
  let UpdateDataCardText = document.createElement("p"); UpdateDataCardBody.appendChild(UpdateDataCardText);
2477
2482
  UpdateDataCardText.className = "card-text";
2483
+ //release notes
2484
+ if (Data.Notes != undefined) {
2485
+ UpdateDataCardText.innerHTML = Data.Notes;
2486
+ }
2478
2487
  let UpdateDataCardList = document.createElement("ul"); UpdateDataCardText.appendChild(UpdateDataCardList);
2479
2488
  UpdateDataCardList.className = "list-group list-group-flush";
2480
2489
  for (let j = 0; j < Data.UpdateContents.length; j++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {