| 
					
				 | 
			
			
				@@ -72,27 +72,30 @@ export function saveDiscordAuthWindowId (params) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export function discordLoginCode({code}, sender) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     console.log('sender', sender) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let {windowId, id} = sender.tab || {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // chrome.tabs.remove(sender.tab.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if(windowId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        chrome.windows.remove( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            windowId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 发送请求 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                getDiscordUserInfo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    authCode: code, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redirectUrl: discordAuthRedirectUri 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            sendActivetabMessage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                actionType: 'BACK_DISCORD_LOGIN_SUCCESS'     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    chrome.tabs.remove(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 发送请求 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getDiscordUserInfo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        authCode: code, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        redirectUrl: discordAuthRedirectUri 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                sendActivetabMessage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    actionType: 'BACK_DISCORD_LOGIN_SUCCESS'     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // if(windowId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     chrome.windows.remove( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //         windowId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //         function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export function twitterShortUrl(sender, url) { 
			 |