|
@@ -1330,37 +1330,7 @@ export function publishNFTTweetEvent({ groupId, postId, srcContent }) {
|
|
|
}
|
|
|
publishTweetBtn && publishTweetBtn.addEventListener('click', function () {
|
|
|
// 获取文案上报
|
|
|
- let inputEle = document.querySelector('div[contenteditable="true"]');
|
|
|
- let textContent = inputEle.innerText
|
|
|
- let arr = srcContent.split(' ') || []
|
|
|
- let text_content_arr = textContent.split(' ') || []
|
|
|
- arr.forEach((item) => {
|
|
|
- if (textContent.includes(item)) {
|
|
|
- textContent = textContent.replaceAll(item, '')
|
|
|
- }
|
|
|
- })
|
|
|
- text_content_arr.forEach((item) => {
|
|
|
- if (item.includes('#DNFT') || item.includes('⬇️')) {
|
|
|
- textContent = textContent.replaceAll(item, '')
|
|
|
- }
|
|
|
- })
|
|
|
- textContent = textContent.replaceAll('#DNFT', '')
|
|
|
- textContent = textContent.replaceAll('⬇️', '')
|
|
|
-
|
|
|
- let formData = {
|
|
|
- groupId,
|
|
|
- textContent
|
|
|
- }
|
|
|
- let params = {
|
|
|
- postBizData: JSON.stringify(formData),
|
|
|
- postSrc: 1, //1 twitter
|
|
|
- postType: 2, //2 nft
|
|
|
- postId
|
|
|
- }
|
|
|
- chrome.runtime.sendMessage({
|
|
|
- actionType: "CONTENT_NFT_TXT_PUBLISH",
|
|
|
- data: params
|
|
|
- }, () => { });
|
|
|
+ publishNFTTweetPost({ postId, srcContent, groupId })
|
|
|
jumpTwitterDetailByAlert()
|
|
|
setTimeout(() => {
|
|
|
setGroupTabSelfStyle({
|
|
@@ -1377,6 +1347,40 @@ export function publishNFTTweetEvent({ groupId, postId, srcContent }) {
|
|
|
}, 800)
|
|
|
}
|
|
|
|
|
|
+export const publishNFTTweetPost = ({ postId, srcContent, groupId }) => {
|
|
|
+ let inputEle = document.querySelector('div[contenteditable="true"]');
|
|
|
+ let textContent = inputEle.innerText
|
|
|
+ let arr = srcContent.split(' ') || []
|
|
|
+ let text_content_arr = textContent.split(' ') || []
|
|
|
+ arr.forEach((item) => {
|
|
|
+ if (textContent.includes(item)) {
|
|
|
+ textContent = textContent.replaceAll(item, '')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ text_content_arr.forEach((item) => {
|
|
|
+ if (item.includes('#DNFT') || item.includes('⬇️')) {
|
|
|
+ textContent = textContent.replaceAll(item, '')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ textContent = textContent.replaceAll('#DNFT', '')
|
|
|
+ textContent = textContent.replaceAll('⬇️', '')
|
|
|
+
|
|
|
+ let formData = {
|
|
|
+ groupId,
|
|
|
+ textContent
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ postBizData: JSON.stringify(formData),
|
|
|
+ postSrc: 1, //1 twitter
|
|
|
+ postType: 2, //2 nft
|
|
|
+ postId
|
|
|
+ }
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_NFT_TXT_PUBLISH",
|
|
|
+ data: params
|
|
|
+ }, () => { });
|
|
|
+}
|
|
|
+
|
|
|
const content_get_nft_post_pre = (data) => {
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_GET_TWITTER_NFT_POST_PRE",
|