xmoj-script 1.2.57 → 1.2.58

Sign up to get free protection for your applications and to get access to all the features.
package/Update.json CHANGED
@@ -2453,6 +2453,17 @@
2453
2453
  }
2454
2454
  ],
2455
2455
  "Notes": "No release notes were provided for this release."
2456
+ },
2457
+ "1.2.58": {
2458
+ "UpdateDate": 1724058379641,
2459
+ "Prerelease": true,
2460
+ "UpdateContents": [
2461
+ {
2462
+ "PR": 715,
2463
+ "Description": "更改短消息显示"
2464
+ }
2465
+ ],
2466
+ "Notes": "No release notes were provided for this release."
2456
2467
  }
2457
2468
  }
2458
2469
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.2.57
3
+ // @version 1.2.58
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -598,7 +598,9 @@ class NavbarStyler {
598
598
  }
599
599
  }
600
600
  }
601
-
601
+ function replaceMarkdownImages(text,string) {
602
+ return text.replace(/!\[.*?\]\(.*?\)/g,string);
603
+ }
602
604
  async function main() {
603
605
  try {
604
606
  if (location.href.startsWith('http://')) {
@@ -4147,7 +4149,7 @@ int main()
4147
4149
  }
4148
4150
  let LastsMessageCell = document.createElement("td");
4149
4151
  Row.appendChild(LastsMessageCell);
4150
- LastsMessageCell.innerText = Data[i].LastsMessage;
4152
+ LastsMessageCell.innerText = replaceMarkdownImages(Data[i].LastsMessage,'[image]');
4151
4153
  let SendTimeCell = document.createElement("td");
4152
4154
  Row.appendChild(SendTimeCell);
4153
4155
  SendTimeCell.innerHTML = GetRelativeTime(Data[i].SendTime);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.2.57",
3
+ "version": "1.2.58",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {