|
@@ -228,7 +228,7 @@ export function onInstalledMid(cb) {
|
|
|
// 没有cookie
|
|
|
if (res_arr && res_arr.length) {
|
|
|
setChromeStorage({ mid: JSON.stringify(res_arr[0]) }, () => {
|
|
|
- cb && cb()
|
|
|
+ cb && cb()
|
|
|
})
|
|
|
} else {
|
|
|
let _params = {
|
|
@@ -236,7 +236,7 @@ export function onInstalledMid(cb) {
|
|
|
}
|
|
|
setChromeCookie(LANDING_PAGE, { 'mid': _params.mid })
|
|
|
setChromeStorage({ mid: JSON.stringify(_params) }, () => {
|
|
|
- cb && cb()
|
|
|
+ cb && cb()
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -333,23 +333,24 @@ function sendActivetabMessage(message = {}) {
|
|
|
* 安装后打开新标签页
|
|
|
*/
|
|
|
|
|
|
-export function onInstalledCreateTab() {
|
|
|
+export function onInstalledCreateTab({ reason }) {
|
|
|
try {
|
|
|
getChromeCookie(LANDING_PAGE_JUMP_INFO, (res = {}) => {
|
|
|
onInstalledMid(() => {
|
|
|
- setTimeout(() => {
|
|
|
- if (!res) {
|
|
|
- res = {}
|
|
|
- }
|
|
|
- // 安装成功埋点
|
|
|
- Report.reportLog({
|
|
|
- objectType: Report.objectType.chrome_extension_installed,
|
|
|
- funcName: 'onInstalledCreateTab',
|
|
|
- postId: res.postId || '',
|
|
|
- shareLinkId: res.shareLinkId || '',
|
|
|
- 'channel-name': res.channelName
|
|
|
- })
|
|
|
- }, 5000)
|
|
|
+ setTimeout(() => {
|
|
|
+ if (!res) {
|
|
|
+ res = {}
|
|
|
+ }
|
|
|
+ // 安装成功埋点
|
|
|
+ Report.reportLog({
|
|
|
+ objectType: Report.objectType.chrome_extension_installed,
|
|
|
+ funcName: 'onInstalledCreateTab',
|
|
|
+ postId: res.postId || '',
|
|
|
+ shareLinkId: res.shareLinkId || '',
|
|
|
+ 'channel-name': res.channelName,
|
|
|
+ reason
|
|
|
+ })
|
|
|
+ }, 5000)
|
|
|
});
|
|
|
|
|
|
let url = 'https://twitter.com/search?q=%23denet'
|