xmoj-script 1.1.30 → 1.1.32

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.
package/Update.json CHANGED
@@ -1128,6 +1128,28 @@
1128
1128
  }
1129
1129
  ],
1130
1130
  "Notes": "No release notes were provided for this release."
1131
+ },
1132
+ "1.1.31": {
1133
+ "UpdateDate": 1706507178378,
1134
+ "Prerelease": false,
1135
+ "UpdateContents": [
1136
+ {
1137
+ "PR": 403,
1138
+ "Description": "make the script much faster"
1139
+ }
1140
+ ],
1141
+ "Notes": "No release notes were provided for this release."
1142
+ },
1143
+ "1.1.32": {
1144
+ "UpdateDate": 1706509019854,
1145
+ "Prerelease": true,
1146
+ "UpdateContents": [
1147
+ {
1148
+ "PR": 406,
1149
+ "Description": "more choices"
1150
+ }
1151
+ ],
1152
+ "Notes": "No release notes were provided for this release."
1131
1153
  }
1132
1154
  }
1133
1155
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.30
3
+ // @version 1.1.32
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -328,7 +328,7 @@ let TidyTable = (Table) => {
328
328
  let UtilityEnabled = (Name) => {
329
329
  if (localStorage.getItem("UserScript-Setting-" + Name) == null) {
330
330
  //DebugMode is off by default
331
- localStorage.setItem("UserScript-Setting-" + Name, (Name == "DebugMode" ? "false" : "true"));
331
+ localStorage.setItem("UserScript-Setting-" + Name, (Name == "DebugMode" || Name == "UnpkgCdn" ? "false" : "true"));
332
332
  }
333
333
  return localStorage.getItem("UserScript-Setting-" + Name) == "true";
334
334
  };
@@ -487,8 +487,7 @@ if (location.host != "www.xmoj.tech") {
487
487
  } else {
488
488
  document.querySelector("html").setAttribute("data-bs-theme", "light");
489
489
  }
490
-
491
- let resources = [
490
+ var resources = [
492
491
  {
493
492
  type: 'script',
494
493
  src: 'https://cdn.bootcdn.net/ajax/libs/popper.js/2.11.7/umd/popper.min.js',
@@ -520,7 +519,10 @@ if (location.host != "www.xmoj.tech") {
520
519
  isModule: true
521
520
  }
522
521
  ];
523
-
522
+ 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';
525
+ }
524
526
  let loadResources = async () => {
525
527
  let promises = resources.map(resource => {
526
528
  return new Promise((resolve, reject) => {
@@ -1133,7 +1135,8 @@ if (location.host != "www.xmoj.tech") {
1133
1135
  {"ID": "CompareSource", "Type": "A", "Name": "比较代码"},
1134
1136
  {"ID": "BBSPopup", "Type": "A", "Name": "讨论提醒"},
1135
1137
  {"ID": "MessagePopup", "Type": "A", "Name": "短消息提醒"},
1136
- {"ID": "DebugMode", "Type": "A", "Name": "调试模式(仅供开发者使用)"}
1138
+ {"ID": "DebugMode", "Type": "A", "Name": "调试模式(仅供开发者使用)"},
1139
+ {"ID": "UnpkgCdn", "Type": "A", "Name": "使用unpkg CDN(不建议使用)"}
1137
1140
  ]));
1138
1141
  let UtilitiesCardFooter = document.createElement("div");
1139
1142
  UtilitiesCardFooter.className = "card-footer text-muted";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {