xmoj-script 1.1.3 → 1.1.4

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--) {
@@ -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.");
package/Update.json CHANGED
@@ -717,6 +717,17 @@
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 测试"
720
731
  }
721
732
  }
722
733
  }
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.4
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -791,6 +791,10 @@ else {
791
791
  UpdateDataCardSubtitle.innerHTML = GetRelativeTime(Data.UpdateDate);
792
792
  let UpdateDataCardText = document.createElement("p"); UpdateDataCardBody.appendChild(UpdateDataCardText);
793
793
  UpdateDataCardText.className = "card-text";
794
+ //release notes
795
+ if (Data.Notes != undefined){
796
+ UpdateDataCardText.innerHTML = Data.ReleaseNotes;
797
+ }
794
798
  let UpdateDataCardList = document.createElement("ul"); UpdateDataCardText.appendChild(UpdateDataCardList);
795
799
  UpdateDataCardList.className = "list-group list-group-flush";
796
800
  for (let j = 0; j < Data.UpdateContents.length; j++) {
@@ -2475,6 +2479,10 @@ else {
2475
2479
  UpdateDataCardSubtitle.innerHTML = GetRelativeTime(Data.UpdateDate);
2476
2480
  let UpdateDataCardText = document.createElement("p"); UpdateDataCardBody.appendChild(UpdateDataCardText);
2477
2481
  UpdateDataCardText.className = "card-text";
2482
+ //release notes
2483
+ if (Data.Notes != undefined) {
2484
+ UpdateDataCardText.innerHTML = Data.Notes;
2485
+ }
2478
2486
  let UpdateDataCardList = document.createElement("ul"); UpdateDataCardText.appendChild(UpdateDataCardList);
2479
2487
  UpdateDataCardList.className = "list-group list-group-flush";
2480
2488
  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.4",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {