mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-11-27 10:00:57 +00:00
Update chrome.js
This commit is contained in:
parent
f911e34c16
commit
bbc3aa9a6e
|
|
@ -28,6 +28,7 @@ var ChromeObject = function() {
|
|||
|
||||
this.profileName = "Default";
|
||||
this.userDataDir = null;
|
||||
this.defaultUserDataDir = null;
|
||||
this.installedDir = "Chrome";
|
||||
|
||||
// proxy
|
||||
|
|
@ -81,9 +82,7 @@ var ChromeObject = function() {
|
|||
|
||||
this.setProfile = function(profileName, installedDir) {
|
||||
this.profileName = (profileName == "Default" ? "Chrome" : profileName);
|
||||
if (installedDir != null) {
|
||||
this.installedDir = installedDir;
|
||||
}
|
||||
this.setInstalledDir(installedDir);
|
||||
this.workingDirectory = this.workingDirectory.replace(":installedDir", this.installedDir);
|
||||
this.binPath = this.binPath.replace(":installedDir", this.installedDir);
|
||||
return this;
|
||||
|
|
@ -114,6 +113,13 @@ var ChromeObject = function() {
|
|||
return this;
|
||||
};
|
||||
|
||||
this.setInstalledDir = function(dirname) {
|
||||
if (dirname != null) {
|
||||
this.installedDir = dirname;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
this.setProxy = function(obj) {
|
||||
this.proxy = obj;
|
||||
return this;
|
||||
|
|
@ -1263,42 +1269,50 @@ var ChromeObject = function() {
|
|||
case "msedge":
|
||||
this.workingDirectory = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Microsoft\\Edge\\Application";
|
||||
this.binPath = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\Microsoft\\Edge\\User Data";
|
||||
break;
|
||||
|
||||
case "chrome":
|
||||
this.workingDirectory = SYS.getEnvString("PROGRAMFILES") + "\\Google\\Chrome\\Application";
|
||||
this.binPath = SYS.getEnvString("PROGRAMFILES") + "\\Google\\:installedDir\\Application\\chrome.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\Google\\Chrome\\User Data";
|
||||
break;
|
||||
|
||||
case "chrome.x86":
|
||||
this.workingDirectory = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Google\\Chrome\\Application";
|
||||
this.binPath = SYS.getEnvString("PROGRAMFILES(X86)") + "\\Google\\:installedDir\\Application\\chrome.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\Google\\Chrome\\User Data";
|
||||
break;
|
||||
|
||||
case "chromium":
|
||||
this.workingDirectory = SYS.getEnvString("LOCALAPPDATA") + "\\Chromium\\Application";
|
||||
this.binPath = SYS.getEnvString("LOCALAPPDATA") + "\\Chromium\\Application\\chrome.exe";
|
||||
this.defaultUserDataDir = null; // Edit here
|
||||
break;
|
||||
|
||||
case "opera":
|
||||
this.workingDirectory = SYS.getEnvString("LOCALAPPDATA") + "\\Programs\\Opera";
|
||||
this.binPath = SYS.getEnvString("LOCALAPPDATA") + "\\Programs\\Opera\\opera.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\Opera Software\\Opera Stable\\Default";
|
||||
break;
|
||||
|
||||
case "whale":
|
||||
this.workingDirectory = SYS.getEnvString("PROGRAMFILES") + "\\Naver\\Naver Whale\\Application";
|
||||
this.binPath = SYS.getEnvString("PROGRAMFILES") + "\\Naver\\Naver Whale\\Application\\whale.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\Naver\\Naver Whale\\User Data";
|
||||
this.baseScreenY = 82;
|
||||
break;
|
||||
|
||||
case "brave":
|
||||
this.workingDirectory = SYS.getEnvString("PROGRAMFILES") + "\\BraveSoftware\\Brave-Browser\\Application";
|
||||
this.binPath = SYS.getEnvString("PROGRAMFILES") + "\\BraveSoftware\\Brave-Browser\\Application\\brave.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\BraveSoftware\\Brave-Browser\\User Data";
|
||||
break;
|
||||
|
||||
case "vivaldi":
|
||||
this.workingDirectory = SYS.getEnvString("LOCALAPPDATA") + "\\Vivaldi\\Application";
|
||||
this.binPath = SYS.getEnvString("LOCALAPPDATA") + "\\Vivaldi\\Application\\vivaldi.exe";
|
||||
this.defaultUserDataDir = SYS.getEnvString("LOCALAPPDATA") + "\\Vivaldi\\User Data";
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1428,7 +1442,9 @@ exports.startDebugInPrivate = function(url, proxy, profileName, debuggingPort, i
|
|||
;
|
||||
};
|
||||
|
||||
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.20";
|
||||
exports.publisherName = publisherName;
|
||||
|
||||
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.21";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user