mirror of
				https://github.com/gnh1201/welsonjs.git
				synced 2025-10-31 12:57:31 +00:00 
			
		
		
		
	Update chrome.js
This commit is contained in:
		
							parent
							
								
									d834349da5
								
							
						
					
					
						commit
						624742edf6
					
				|  | @ -28,7 +28,10 @@ var ChromeObject = function() { | |||
|         "port": 1080 | ||||
|     }; | ||||
|     this.inPrivate = false; | ||||
| 
 | ||||
| 	// user agent
 | ||||
|     this.userAgent = null; | ||||
| 	this.userAgents = []; | ||||
| 
 | ||||
|     // dependencies
 | ||||
|     this.oAutoIt = null; | ||||
|  | @ -175,6 +178,11 @@ var ChromeObject = function() { | |||
|         return this; | ||||
|     }; | ||||
| 
 | ||||
| 	this.addUserAgent = function(ua) { | ||||
| 		this.userAgents.push(ua); | ||||
| 		return this; | ||||
| 	}; | ||||
| 
 | ||||
|     this.open = function(url) { | ||||
|         this.setProfile(this.profileName, this.installedDir); | ||||
| 
 | ||||
|  | @ -269,7 +277,12 @@ var ChromeObject = function() { | |||
|             // set user data directory
 | ||||
|             cmd.push("--user-data-dir=\"" + this.userDataDir + "\""); | ||||
| 
 | ||||
|             // set user agent
 | ||||
|             // choice user agent
 | ||||
| 			if (this.userAgents.length > 0) { | ||||
| 				this.setUserAgent(RAND.one(this.userAgents)); | ||||
| 			} | ||||
| 
 | ||||
| 			// set user agent
 | ||||
|             if (this.userAgent != null) { | ||||
|                 cmd.push("--user-agent=\"" + this.userAgent + "\""); | ||||
|             } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 GitHub
							GitHub