xmoj-script 1.1.2 → 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
@@ -707,6 +707,27 @@
707
707
  "Description": "改变更新架构"
708
708
  }
709
709
  ]
710
+ },
711
+ "1.1.3": {
712
+ "UpdateDate": 1702821395564,
713
+ "Prerelease": true,
714
+ "UpdateContents": [
715
+ {
716
+ "PR": 302,
717
+ "Description": "Update allowed tags in PurifyHTML function to allow the tag"
718
+ }
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 测试"
710
731
  }
711
732
  }
712
733
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.2
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
@@ -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", "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"],
40
+ "ALLOWED_TAGS": ["a", "b", "big", "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
  }
@@ -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.2",
3
+ "version": "1.1.4",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {