|
@@ -111,9 +111,7 @@ export function showTwitterPublishDialogHandler(publishRes) {
|
|
|
|
|
|
setChromeStorage({ publishData: JSON.stringify(publishRes) })
|
|
|
|
|
|
- addPublishTipsIframe({
|
|
|
- srcContent: publishRes.copyContent
|
|
|
- })
|
|
|
+ addPublishTipsIframe()
|
|
|
// _setPublishContent(publishRes.srcContent);
|
|
|
setDialogPublishContent(publishRes.srcContent);
|
|
|
_publishTweetEvent(publishRes, bindTwitterArtMethod);
|
|
@@ -288,7 +286,8 @@ function _addDeNetEditBtn(params = {}) {
|
|
|
});
|
|
|
let innerDeIcon = document.getElementById('de-btn1');
|
|
|
if (!innerDeIcon) {
|
|
|
- toolElem.firstChild.appendChild(createTweetToolbarDenet())
|
|
|
+ toolElem.firstChild.appendChild(createTweetToolbarDenet());
|
|
|
+ popupShowGiveawayDialog();
|
|
|
}
|
|
|
|
|
|
let innerToolBoxIcon = document.getElementById('de-tool-box-btn-01');
|
|
@@ -306,7 +305,8 @@ function _addDeNetEditBtn(params = {}) {
|
|
|
});
|
|
|
let innerDeIcon = document.getElementById('de-btn1');
|
|
|
if (!innerDeIcon) {
|
|
|
- toolElem.firstChild.appendChild(createTweetToolbarDenet())
|
|
|
+ toolElem.firstChild.appendChild(createTweetToolbarDenet());
|
|
|
+ popupShowGiveawayDialog();
|
|
|
}
|
|
|
|
|
|
let innerToolBoxIcon = document.getElementById('de-tool-box-btn-01');
|
|
@@ -319,6 +319,13 @@ function _addDeNetEditBtn(params = {}) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const popupShowGiveawayDialog = async () => {
|
|
|
+ let { show = false } = await getChromeStorage('showGiveawayData') || {};
|
|
|
+ if (show) {
|
|
|
+ chrome.storage.local.remove("showGiveawayData");
|
|
|
+ showPublishDialog()
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 获取左侧twitter按钮
|
|
@@ -612,7 +619,7 @@ function createTweetToolbarToolBox() {
|
|
|
|
|
|
return deToolBoxBtn;
|
|
|
}
|
|
|
-async function addSliderNavDeBtn(isSmall = false) {
|
|
|
+function addSliderNavDeBtn(isSmall = false) {
|
|
|
try {
|
|
|
if (!isSmall) {
|
|
|
let bigDom = document.querySelector('a[href="/compose/tweet"]').parentNode.parentNode;
|
|
@@ -640,12 +647,6 @@ async function addSliderNavDeBtn(isSmall = false) {
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
|
}
|
|
|
-
|
|
|
- let { show = false } = await getChromeStorage('showGiveawayData') || {};
|
|
|
- if (show) {
|
|
|
- chrome.storage.local.remove("showGiveawayData");
|
|
|
- showPublishDialog()
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
function onWindowResize() {
|