浏览代码

[add][sendContentByTwitterID]

zhangwei 2 年之前
父节点
当前提交
3e7ebc5cee
共有 1 个文件被更改,包括 13 次插入0 次删除
  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
+        }
+    })
+}