|
@@ -773,9 +773,9 @@ const createNFTIframe = ({ url, id }, callback) => {
|
|
|
|
|
|
function initParseCard() {
|
|
|
let timer = setInterval(() => {
|
|
|
- let inTwitter = window.location.href.includes('twitter.com');
|
|
|
+ let inTwitter = window.location.host.includes('twitter.com');
|
|
|
let inTwitterNode = document.querySelector('main');
|
|
|
- let inFacebook = window.location.href.includes('facebook.com');
|
|
|
+ let inFacebook = window.location.host.includes('facebook.com');
|
|
|
let inFacebookNode = document.querySelector('#facebook');
|
|
|
if (inTwitter && inTwitterNode) {
|
|
|
clearInterval(timer)
|
|
@@ -832,23 +832,26 @@ export function init() {
|
|
|
}
|
|
|
}, () => { });
|
|
|
|
|
|
- let where = window.location.href.indexOf('twitter.com') < 0 && window.location.href.indexOf('facebook.com') < 0;
|
|
|
+ let where = window.location.host.indexOf('twitter.com') < 0 && window.location.host.indexOf('facebook.com') < 0;
|
|
|
if (where) {
|
|
|
return
|
|
|
}
|
|
|
twitterPinLogin();
|
|
|
+ if(window.location.host.includes('twitter.com')){
|
|
|
+ showNFTCard()
|
|
|
+ showNFTGroupIcon()
|
|
|
+ addEventAction();
|
|
|
+ checkUserJoinGroup();
|
|
|
+ renderDom();
|
|
|
+ checkTwitterTaskState();
|
|
|
+ initBuyNFT();
|
|
|
+ addJoinedGroupList();
|
|
|
+ getSysTheme();
|
|
|
+ addGroupTab();
|
|
|
+ }
|
|
|
// 渲染dom
|
|
|
initParseCard()
|
|
|
- showNFTCard()
|
|
|
- showNFTGroupIcon()
|
|
|
- addEventAction();
|
|
|
- checkUserJoinGroup();
|
|
|
- renderDom();
|
|
|
- checkTwitterTaskState();
|
|
|
- initBuyNFT();
|
|
|
- addJoinedGroupList();
|
|
|
- getSysTheme();
|
|
|
- addGroupTab();
|
|
|
+
|
|
|
|
|
|
getChromeStorage("popupShowPublishDialog", (res) => {
|
|
|
console.log("popupShowPublishDialog", res);
|