availablity check before run on active tab
This commit is contained in:
		| @ -56,6 +56,11 @@ class Extractor { | ||||
|             tab = await createTab(task.urls[0], false); | ||||
|         } else { | ||||
|             tab = await getActiveTab(true) || await getActiveTab(false); | ||||
|             let succ = await ping(tab); | ||||
|             if (!succ) { | ||||
|                 console.log('Cannot contact with active tab.'); | ||||
|                 return; | ||||
|             } | ||||
|         } | ||||
|         this._running = true; | ||||
|         return this._tasks.reduce((pms, task, i) => { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user