Explorar o código

[edit][过滤发布文案]

zhangwei %!s(int64=2) %!d(string=hai) anos
pai
achega
785b1e69d7
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/logic/content/twitter.js

+ 6 - 1
src/logic/content/twitter.js

@@ -1351,6 +1351,10 @@ export function publishNFTTweetEvent({ groupId, postId, srcContent }, callback)
 export const publishNFTTweetPost = ({ postId, srcContent, groupId }) => {
     let inputEle = document.querySelector('div[contenteditable="true"]');
     let textContent = inputEle.innerText
+    srcContent = srcContent.replaceAll('#DNFT', '')
+    srcContent = srcContent.replaceAll('⬇️', '')
+    srcContent = srcContent.replaceAll('Join', '')
+    srcContent = srcContent.replaceAll('Now:', '')
     let arr = srcContent.split(' ') || []
     arr.forEach((item) => {
         if (textContent.includes(item)) {
@@ -1359,7 +1363,8 @@ export const publishNFTTweetPost = ({ postId, srcContent, groupId }) => {
     })
     textContent = textContent.replaceAll('#DNFT', '')
     textContent = textContent.replaceAll('⬇️', '')
-    textContent = textContent.replaceAll('Join Now:', '')
+    textContent = textContent.replaceAll('Join', '')
+    textContent = textContent.replaceAll('Now:', '')
 
     let formData = {
         groupId,