|
@@ -1,5 +1,5 @@
|
|
import { getChromeStorage, setChromeStorage } from '@/uilts/chromeExtension.js'
|
|
import { getChromeStorage, setChromeStorage } from '@/uilts/chromeExtension.js'
|
|
-import { throttle, getQueryString, getCookie } from '@/uilts/help'
|
|
|
|
|
|
+import { throttle, getQueryString, getCookie, nextTick } from '@/uilts/help'
|
|
import { discordAuthRedirectUri } from '@/http/configAPI'
|
|
import { discordAuthRedirectUri } from '@/http/configAPI'
|
|
import { reportSrcPublishEvent } from '@/http/publishApi'
|
|
import { reportSrcPublishEvent } from '@/http/publishApi'
|
|
import Report from "@/log-center/log"
|
|
import Report from "@/log-center/log"
|
|
@@ -95,6 +95,23 @@ export function showTwitterPublishDialogHandler(publishRes) {
|
|
_publishTweetEvent(publishRes, bindTwitterArtMethod);
|
|
_publishTweetEvent(publishRes, bindTwitterArtMethod);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+export function twitterPublishHandler(res) {
|
|
|
|
+ let bigBtn = document.querySelector('a[data-testid="SideNav_NewTweet_Button"]');
|
|
|
|
+ if (bigBtn) {
|
|
|
|
+ bigBtn.click();
|
|
|
|
+ } else {
|
|
|
|
+ let smallBtn = document.querySelector('a[href="/compose/tweet"]')
|
|
|
|
+ smallBtn && smallBtn.click();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ document.execCommand('selectAll');
|
|
|
|
+ }, 100).then(() => {
|
|
|
|
+ document.execCommand('delete');
|
|
|
|
+ _setPublishContent(res.srcContent);
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
export function showPinTips() {
|
|
export function showPinTips() {
|
|
getChromeStorage('pinData', (res) => {
|
|
getChromeStorage('pinData', (res) => {
|
|
if (!res || res.show) {
|
|
if (!res || res.show) {
|
|
@@ -1186,7 +1203,7 @@ export const showNFTCard = () => {
|
|
nftElement.innerHTML = `
|
|
nftElement.innerHTML = `
|
|
${iframe.outerHTML}
|
|
${iframe.outerHTML}
|
|
<style>
|
|
<style>
|
|
- #de-nft-node {user-select:none; height:297px; margin-bottom:17px; display:none;}
|
|
|
|
|
|
+ #de-nft-node {height:297px; margin-bottom:17px; display:none;}
|
|
</style>
|
|
</style>
|
|
`;
|
|
`;
|
|
|
|
|
|
@@ -1197,6 +1214,5 @@ export const showNFTCard = () => {
|
|
}
|
|
}
|
|
|
|
|
|
export const showNFTSale = () => {
|
|
export const showNFTSale = () => {
|
|
- debugger
|
|
|
|
document.querySelector('div[id="de-nft-node"]').style.display = 'block';
|
|
document.querySelector('div[id="de-nft-node"]').style.display = 'block';
|
|
}
|
|
}
|