|
@@ -113,6 +113,8 @@ export function twitterPublishHandler(res) {
|
|
}
|
|
}
|
|
|
|
|
|
export function showPinTips() {
|
|
export function showPinTips() {
|
|
|
|
+ hidePopupPage();
|
|
|
|
+ hideNoticeBindTweet();
|
|
getChromeStorage('pinData', (res) => {
|
|
getChromeStorage('pinData', (res) => {
|
|
if (!res || res.show) {
|
|
if (!res || res.show) {
|
|
let domPop = document.getElementById('de-pin-pop');
|
|
let domPop = document.getElementById('de-pin-pop');
|
|
@@ -122,8 +124,6 @@ export function showPinTips() {
|
|
}
|
|
}
|
|
|
|
|
|
export function hidePinTips() {
|
|
export function hidePinTips() {
|
|
- hidePopupPage();
|
|
|
|
- hideNoticeBindTweet();
|
|
|
|
let pop = document.querySelector('#de-pin-pop');
|
|
let pop = document.querySelector('#de-pin-pop');
|
|
if (pop) {
|
|
if (pop) {
|
|
pop.style.display = 'none';
|
|
pop.style.display = 'none';
|
|
@@ -376,6 +376,8 @@ function addPublishTipsIframe(params = {}) {
|
|
}
|
|
}
|
|
|
|
|
|
export function noticeBindTweet(params) {
|
|
export function noticeBindTweet(params) {
|
|
|
|
+ hidePinTips();
|
|
|
|
+ hidePopupPage();
|
|
let iframe = document.createElement('iframe');
|
|
let iframe = document.createElement('iframe');
|
|
iframe.id = 'de-notice-bind-tweet';
|
|
iframe.id = 'de-notice-bind-tweet';
|
|
iframe.src = chrome.runtime.getURL('/iframe/bind-tweet.html') + `?params=${JSON.stringify(params)}`;
|
|
iframe.src = chrome.runtime.getURL('/iframe/bind-tweet.html') + `?params=${JSON.stringify(params)}`;
|
|
@@ -387,8 +389,6 @@ export function noticeBindTweet(params) {
|
|
}
|
|
}
|
|
|
|
|
|
export function hideNoticeBindTweet() {
|
|
export function hideNoticeBindTweet() {
|
|
- hidePinTips();
|
|
|
|
- hidePopupPage();
|
|
|
|
let iframeContent = document.getElementById('de-notice-bind-tweet');
|
|
let iframeContent = document.getElementById('de-notice-bind-tweet');
|
|
if (iframeContent) {
|
|
if (iframeContent) {
|
|
document.querySelector('body').removeChild(iframeContent)
|
|
document.querySelector('body').removeChild(iframeContent)
|
|
@@ -1305,12 +1305,12 @@ export const appendPopupPage = (params) => {
|
|
|
|
|
|
export const showPopupPage = (params) => {
|
|
export const showPopupPage = (params) => {
|
|
let { path = '' } = params;
|
|
let { path = '' } = params;
|
|
|
|
+ hidePinTips();
|
|
|
|
+ hideNoticeBindTweet();
|
|
appendPopupPage({ path });
|
|
appendPopupPage({ path });
|
|
}
|
|
}
|
|
|
|
|
|
export const hidePopupPage = () => {
|
|
export const hidePopupPage = () => {
|
|
- hidePinTips();
|
|
|
|
- hideNoticeBindTweet();
|
|
|
|
let iframe = document.getElementById('de-popup-page');
|
|
let iframe = document.getElementById('de-popup-page');
|
|
if (iframe) {
|
|
if (iframe) {
|
|
document.querySelector('body').removeChild(iframe);
|
|
document.querySelector('body').removeChild(iframe);
|