|
@@ -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,7 +1197,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?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) => {
|
|
@@ -1411,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')
|
|
@@ -1770,12 +1773,8 @@ const getGroupTabNode = () => {
|
|
|
}
|
|
|
|
|
|
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) {
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (!document.querySelector('div[data-testid=UserName]')) {
|
|
|
+ return
|
|
|
}
|
|
|
let tabListDom = document.querySelector('div[role="tablist"]');
|
|
|
let groupItemTab = getGroupTabNode();
|