Sfoglia il codice sorgente

[edit][过滤发布文案]

zhangwei 2 anni fa
parent
commit
785b1e69d7
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  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,