|
@@ -1,7 +1,7 @@
|
|
import { fetchTtwitterRequestToken, fetchTwitterLogin, fetchTwitterShortUrl, fetchAllMessageInfo, fetchReadTaskAllMsg, getDiscordUserInfo, fetchGetTwitterNftPostPre, fetchPublish, fetchGetAllUnReadNotices } from '@/logic/background/fetch/twitter.js'
|
|
import { fetchTtwitterRequestToken, fetchTwitterLogin, fetchTwitterShortUrl, fetchAllMessageInfo, fetchReadTaskAllMsg, getDiscordUserInfo, fetchGetTwitterNftPostPre, fetchPublish, fetchGetAllUnReadNotices } from '@/logic/background/fetch/twitter.js'
|
|
-import { LANDING_PAGE, LANDING_PAGE_MID, setChromeStorage, setChromeCookie, getChromeCookie, getChromeStorage, removeChromeCookie } from '@/uilts/chromeExtension.js'
|
|
|
|
|
|
+import { LANDING_PAGE, LANDING_PAGE_MID, setChromeStorage, setChromeCookie, getChromeCookie, getChromeStorage, removeChromeCookie, LANDING_PAGE_JUMP_INFO } from '@/uilts/chromeExtension.js'
|
|
import { guid } from '@/uilts/help.js'
|
|
import { guid } from '@/uilts/help.js'
|
|
-import { pageUrl, discordAuthRedirectUri } from '@/http/configAPI'
|
|
|
|
|
|
+import { discordAuthRedirectUri } from '@/http/configAPI'
|
|
import { setContentMessage } from '@/logic/background/help.js'
|
|
import { setContentMessage } from '@/logic/background/help.js'
|
|
|
|
|
|
let authToken = ''
|
|
let authToken = ''
|
|
@@ -250,13 +250,7 @@ function sendActivetabMessage(message = {}) {
|
|
*/
|
|
*/
|
|
|
|
|
|
export function onInstalledCreateTab() {
|
|
export function onInstalledCreateTab() {
|
|
- // 落地页参数
|
|
|
|
- let cookiesParams = {
|
|
|
|
- name: 'jump_info',
|
|
|
|
- url: pageUrl
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- getChromeCookie(cookiesParams, (res) => {
|
|
|
|
|
|
+ getChromeCookie(LANDING_PAGE_JUMP_INFO, (res) => {
|
|
// jump_info
|
|
// jump_info
|
|
if (!res || !res.jump_type) {
|
|
if (!res || !res.jump_type) {
|
|
chrome.tabs.create({
|
|
chrome.tabs.create({
|
|
@@ -327,13 +321,13 @@ export function onInstalledCreateTab() {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
|
|
|
|
- if(created_detail == false){
|
|
|
|
|
|
+ if (created_detail == false) {
|
|
chrome.tabs.create({
|
|
chrome.tabs.create({
|
|
url: "https://twitter.com",
|
|
url: "https://twitter.com",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- removeChromeCookie(cookiesParams)
|
|
|
|
|
|
+ removeChromeCookie(LANDING_PAGE_JUMP_INFO)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -530,9 +524,11 @@ export const checkShowPublishDialog = (params) => {
|
|
}
|
|
}
|
|
|
|
|
|
const createTabShowGiveaway = (params) => {
|
|
const createTabShowGiveaway = (params) => {
|
|
- setChromeStorage({showGiveawayData : JSON.stringify({
|
|
|
|
- show: true
|
|
|
|
- })});
|
|
|
|
|
|
+ setChromeStorage({
|
|
|
|
+ showGiveawayData: JSON.stringify({
|
|
|
|
+ show: true
|
|
|
|
+ })
|
|
|
|
+ });
|
|
chrome.tabs.create({
|
|
chrome.tabs.create({
|
|
url: params.url,
|
|
url: params.url,
|
|
});
|
|
});
|