mirror of
				https://github.com/gnh1201/welsonjs.git
				synced 2025-10-31 04:51:17 +00:00 
			
		
		
		
	Update chrome.js
This commit is contained in:
		
							parent
							
								
									f22a11c246
								
							
						
					
					
						commit
						d88132da05
					
				|  | @ -26,6 +26,7 @@ var ChromeObject = function() { | ||||||
| 
 | 
 | ||||||
|     this.profileName = "Default"; |     this.profileName = "Default"; | ||||||
|     this.userDataDir = null; |     this.userDataDir = null; | ||||||
|  |     this.installedDir = "Chrome"; | ||||||
| 
 | 
 | ||||||
|     // proxy
 |     // proxy
 | ||||||
|     this.isPreventProxy = false; |     this.isPreventProxy = false; | ||||||
|  | @ -76,6 +77,8 @@ var ChromeObject = function() { | ||||||
| 
 | 
 | ||||||
|     this.setProfile = function(profileName, installedDir) { |     this.setProfile = function(profileName, installedDir) { | ||||||
|         this.profileName = (profileName == "Default" ? "Chrome" : profileName); |         this.profileName = (profileName == "Default" ? "Chrome" : profileName); | ||||||
|  |         this.workingDirectory = this.workingDirectory.replace(":installedDir", installedDir); | ||||||
|  |         this.binPath = this.binPath.replace(":installedDir", installedDir); | ||||||
|         return this; |         return this; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | @ -156,11 +159,7 @@ var ChromeObject = function() { | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         var cmd = [ |         var cmd = [ | ||||||
|             "cscript", |             this.binPath | ||||||
|             "app.js", |  | ||||||
|             "shoutcut", |  | ||||||
|             "chrome", |  | ||||||
|             this.installedDir, |  | ||||||
|         ]; |         ]; | ||||||
| 
 | 
 | ||||||
|         // disable default browser check
 |         // disable default browser check
 | ||||||
|  | @ -189,7 +188,7 @@ var ChromeObject = function() { | ||||||
|         cmd.push("\"--user-data-dir=" + this.userDataDir + "\""); |         cmd.push("\"--user-data-dir=" + this.userDataDir + "\""); | ||||||
|         cmd.push("\"" + url + "\""); |         cmd.push("\"" + url + "\""); | ||||||
| 
 | 
 | ||||||
|         SHELL.createShoutcut("Chrome (" + this.installedDir + ")", cmd.join(' '), SYS.getCurrentScriptDirectory()); |         SHELL.createShoutcut(this.publisherName + " (" + this.profileName + ")", cmd.join(' '), SYS.getCurrentScriptDirectory()); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     this.setInPrivate = function(flag) { |     this.setInPrivate = function(flag) { | ||||||
|  | @ -226,7 +225,7 @@ var ChromeObject = function() { | ||||||
|         if (!FILE.fileExists(this.binPath)) { |         if (!FILE.fileExists(this.binPath)) { | ||||||
|             this.workingDirectory = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Google\\:installedDir\\Application"; |             this.workingDirectory = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Google\\:installedDir\\Application"; | ||||||
|             this.binPath = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Google\\:installedDir\\Application\\chrome.exe"; |             this.binPath = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Google\\:installedDir\\Application\\chrome.exe"; | ||||||
|             this.setProfile(this.profileName); |             this.setProfile(this.profileName, this.installedDir); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // find a executable file
 |         // find a executable file
 | ||||||
|  | @ -1254,7 +1253,7 @@ var ChromeObject = function() { | ||||||
| 
 | 
 | ||||||
|             case "chrome": |             case "chrome": | ||||||
|                 this.workingDirectory = SYS.getEnvString("PROGRAMFILES") + "\\Google\\Chrome\\Application"; |                 this.workingDirectory = SYS.getEnvString("PROGRAMFILES") + "\\Google\\Chrome\\Application"; | ||||||
|                 this.binPath = SYS.getEnvString("PROGRAMFILES") + "\\Google\\Chrome\\Application\\chrome.exe"; |                 this.binPath = SYS.getEnvString("PROGRAMFILES") + "\\Google\\:installedDir\\Application\\chrome.exe"; | ||||||
|                 break; |                 break; | ||||||
| 
 | 
 | ||||||
|             case "chromium": |             case "chromium": | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user