Browse Source

[add][sendContentByTwitterID]

zhangwei 2 years ago
parent
commit
3e7ebc5cee
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/logic/content/twitter.js

+ 13 - 0
src/logic/content/twitter.js

@@ -2626,3 +2626,16 @@ export const showPublishDialog = () => {
         smallBtn.click();
     }
 }
+
+// 获取推文发送回去 
+export const sendContentByTwitterID = (tweet_Id) => {
+    // 获取内容
+    let txt = parseCard.getContentByTwitterId(tweet_Id)
+    // 发送
+    chrome.runtime.sendMessage({
+        actionType: "CONTENT_GET_TWEET_TXT", data: {
+            tweet_Id,
+            txt
+        }
+    })
+}