Browse Source

[edit][弹窗icon错误]

zhangwei 2 years ago
parent
commit
5328e33599
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/logic/content/twitter.js

+ 5 - 3
src/logic/content/twitter.js

@@ -837,7 +837,7 @@ export function init() {
         return
     }
     twitterPinLogin();
-    if(window.location.host.includes('twitter.com')){
+    if (window.location.host.includes('twitter.com')) {
         showNFTCard()
         showNFTGroupIcon()
         addEventAction();
@@ -1197,8 +1197,7 @@ export function doTaskTwitterAPI({ task_data, task_type }) {
 export function showJoinDialog(data) {
     let iframe = document.querySelector('#nftProjectId')
     iframe.style.display = 'block'
-    iframe.src = ''
-    iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?params=${JSON.stringify(data)}`)
+    iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?params=${JSON.stringify(data)}&time=${new Date().getTime()}`)
 }
 
 const TwitterFollowAPI = (item, tweet_Id) => {
@@ -1412,6 +1411,9 @@ const initGroupTip = () => {
     if (location.pathname == '/compose/tweet') {
         return
     }
+    if (!document.querySelector('div[data-testid=UserName]')) {
+        return
+    }
     if (arr.length >= 2) {
         let twitterAccount = arr[1]
         let iframe_banner = document.querySelector('#denet_group_banner')