|
@@ -127,6 +127,7 @@ export const setNFTGroupContent = (res) => {
|
|
let where = (edit.innerText === '\n') || (edit.innerText === '')
|
|
let where = (edit.innerText === '\n') || (edit.innerText === '')
|
|
if (where) {
|
|
if (where) {
|
|
setPostContent(res)
|
|
setPostContent(res)
|
|
|
|
+ _addTweetButtonListen()
|
|
} else {
|
|
} else {
|
|
clearPostContent(() => {
|
|
clearPostContent(() => {
|
|
let inputEle = document.querySelector('div[contenteditable="true"]');
|
|
let inputEle = document.querySelector('div[contenteditable="true"]');
|
|
@@ -134,6 +135,7 @@ export const setNFTGroupContent = (res) => {
|
|
inputEle.focus();
|
|
inputEle.focus();
|
|
}
|
|
}
|
|
setPostContent(res)
|
|
setPostContent(res)
|
|
|
|
+ _addTweetButtonListen()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -168,4 +170,24 @@ export const addJoinedGroupList = () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-};
|
|
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function _addTweetButtonListen() {
|
|
|
|
+ let btn = document.querySelector('div[data-testid="tweetButton"]');
|
|
|
|
+
|
|
|
|
+ btn.removeEventListener('click', _postTweetContent);
|
|
|
|
+ btn.addEventListener('click', _postTweetContent)
|
|
|
|
+}
|
|
|
|
+function _postTweetContent() {
|
|
|
|
+ if (tempNftGroupPost && tempNftGroupPost.groupId) {
|
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
|
+ actionType: "CONTENT_GET_TWITTER_NFT_POST_PRE",
|
|
|
|
+ data: {
|
|
|
|
+ groupId: tempNftGroupPost.groupId
|
|
|
|
+ }
|
|
|
|
+ }, () => { });
|
|
|
|
+ }
|
|
|
|
+}
|