| 
					
				 | 
			
			
				@@ -6,7 +6,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class="search-wrapper"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <input class="input" type="text" v-model="siteUrl" placeholder="Enter link"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div class="btn" @click="searchHandler"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="btn" @click="searchHandler()"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <img :src="require('@/assets/svg/icon-tool-box-search-arrow.svg')" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,6 +68,7 @@ const props = defineProps({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let siteUrl = ref(''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let selectAppGuideData = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let selectGuideApp = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let openWindowList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let historyList = ref([]) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -76,7 +77,7 @@ let appList = ref(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const emits = defineEmits(["changeShowCom"]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const searchHandler = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const searchHandler = async (_params) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let siteTitle = '', favicon = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let timer = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,15 +107,16 @@ const searchHandler = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     createType: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     defaultUrl: siteUrl.value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     guideData: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    iconPath: favicon, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    iconPath: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     interactType: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    linkImagePath: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    name: siteTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    linkImagePath: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    name: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (siteRes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (siteRes.headers['content-type'].indexOf('text/html') < 0 || siteRes.request.status > 399) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // 提示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (siteRes.headers['content-type'].indexOf('text/html') < 0 || siteRes.request.status > 403) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      loadingHide(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      message.error('Page loading failed'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let urlObj = new URL(siteUrl.value); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -124,10 +126,16 @@ const searchHandler = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         siteTitle = urlObj.hostname; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         currentApp.defaultTit = siteTitle; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      currentApp.name = siteTitle; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     favicon = urlObj.origin + '/favicon.ico'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  currentApp.iconPath = favicon; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if(_params) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    currentApp = _params; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let convertRes = await convertUrl({ params: { originUrl: siteUrl.value } }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let params = { convertUrl: siteUrl.value, originUrl: siteUrl.value, appId: '', currentApp }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -159,7 +167,7 @@ const clickHistoryAppHandler = (params) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     clickAppHandler(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     siteUrl.value = params.defaultUrl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    searchHandler(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    searchHandler(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -195,6 +203,7 @@ const openWindow = (params) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const createGuideWindow = (params, isUpdate = false) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   openWindowList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   selectAppGuideData = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  selectGuideApp = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let windowWith = window.screen.width - 500; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let guideUrl = chrome.runtime.getURL('/iframe/tool-box-guide.html'); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -216,7 +225,7 @@ const createGuideWindow = (params, isUpdate = false) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, function (window) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     openWindowList.push(window); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  selectGuideApp = params; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (params.guideData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     selectAppGuideData = JSON.parse(params.guideData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -240,13 +249,14 @@ const onRuntimeMsg = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           actionType: "CONTENT_EDIT_SEND_GUIDE_DATA", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           data: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             guideData: selectAppGuideData, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            windowData: openWindowList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            windowData: openWindowList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            selectGuideApp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, (response) => { }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       case 'CONTENT_GUIDE_APPLY_APP': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         siteUrl.value = req.data.siteUrl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        searchHandler(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        searchHandler(req.data.selectGuideApp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 |