|
@@ -1,5 +1,5 @@
|
|
|
import { getChromeStorage, setChromeStorage } from '@/uilts/chromeExtension.js'
|
|
|
-import { throttle, getQueryString, getCookie, nextTick } from '@/uilts/help'
|
|
|
+import { throttle, getQueryString, getCookie, nextTick ,getQueryStringByUrl} from '@/uilts/help'
|
|
|
import { discordAuthRedirectUri } from '@/http/configAPI'
|
|
|
import { reportSrcPublishEvent } from '@/http/publishApi'
|
|
|
import Report from "@/log-center/log"
|
|
@@ -1193,7 +1193,7 @@ export function doTaskTwitterAPI({ task_data, task_type }) {
|
|
|
export function showJoinDialog(data) {
|
|
|
let iframe = document.querySelector('#nftProjectId')
|
|
|
iframe.style.display = 'block'
|
|
|
- iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?type=${data.type}&buy_nft_status=${data.buy_nft_status}&nft_group_Id=${data.nft_group_Id}&nftProjectId=${data.buyNftProjectId}`)
|
|
|
+ iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?params=${JSON.stringify(data)}`)
|
|
|
}
|
|
|
|
|
|
const TwitterFollowAPI = (item, tweet_Id) => {
|
|
@@ -1321,10 +1321,10 @@ export function publishNFTTweetEvent({ groupId, postId, srcContent }) {
|
|
|
arr.forEach((item) => {
|
|
|
if (textContent.includes(item)) {
|
|
|
textContent = textContent.replaceAll(item, '')
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
- text_content_arr.forEach((item)=>{
|
|
|
- if(item.includes('#DNFT') || item.includes('⬇️')){
|
|
|
+ text_content_arr.forEach((item) => {
|
|
|
+ if (item.includes('#DNFT') || item.includes('⬇️')) {
|
|
|
textContent = textContent.replaceAll(item, '')
|
|
|
}
|
|
|
})
|
|
@@ -1353,6 +1353,10 @@ export function publishNFTTweetEvent({ groupId, postId, srcContent }) {
|
|
|
groupFontWeight: '500',
|
|
|
lineDisplay: 'none'
|
|
|
});
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "SWITCH_GROUP_BANNER_STATUS",
|
|
|
+ data: { type: 'arrow' }
|
|
|
+ }, () => { });
|
|
|
}, 2000);
|
|
|
});
|
|
|
}, 800)
|
|
@@ -1382,15 +1386,17 @@ export const setTwitterTextarea = (params) => {
|
|
|
|
|
|
|
|
|
const initGroupTip = () => {
|
|
|
- let dom_denet_group_tip = document.querySelector('#denet_group_tip')
|
|
|
- if (dom_denet_group_tip) {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
let arr = window.location.pathname.split('/') || []
|
|
|
-
|
|
|
if (arr.length >= 2) {
|
|
|
let twitterAccount = arr[1]
|
|
|
+ let iframe_banner = document.querySelector('#denet_group_tip')
|
|
|
+ if (iframe_banner) {
|
|
|
+ if (twitterAccount != getQueryStringByUrl(iframe_banner.src, 'twitterAccount')) {
|
|
|
+ iframe_banner.style.display = 'none'
|
|
|
+ iframe_banner.src = chrome.runtime.getURL(`/iframe/group-card.html?twitterAccount=${twitterAccount}`)
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
try {
|
|
|
let dom = document.querySelector('div[data-testid="ScrollSnap-SwipeableList"]').closest('nav')
|
|
|
let iframe = document.createElement('iframe')
|
|
@@ -1674,8 +1680,8 @@ export const setPopupConfByPopupPage = () => {
|
|
|
const addGroupTab = () => {
|
|
|
let illegalPages = ['notifications', 'explore', 'followers', 'following'];
|
|
|
let page = window.location.pathname.split('/');
|
|
|
- if(page && page.length) {
|
|
|
- if(illegalPages.indexOf(page[page.length - 1]) > -1) {
|
|
|
+ if (page && page.length) {
|
|
|
+ if (illegalPages.indexOf(page[page.length - 1]) > -1) {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -1737,12 +1743,12 @@ const addGroupTab = () => {
|
|
|
|
|
|
setTimeout(() => {
|
|
|
let tab = getMaskWeb3Tab();
|
|
|
- if(tab) {
|
|
|
+ if (tab) {
|
|
|
tab.style.display = 'none'
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
tab = getMaskWeb3Tab();
|
|
|
- if(tab) {
|
|
|
+ if (tab) {
|
|
|
tab.style.display = 'none'
|
|
|
}
|
|
|
}, 1500)
|
|
@@ -2008,7 +2014,7 @@ const getMaskWeb3Tab = () => {
|
|
|
|
|
|
export const pageJumpHandler = (params) => {
|
|
|
let { url } = params
|
|
|
- if(url) {
|
|
|
+ if (url) {
|
|
|
window.open(url)
|
|
|
}
|
|
|
}
|