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