Merge pull request #275 from gnh1201/dev
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled

Fix #274
This commit is contained in:
Namhyeon Go 2025-06-13 23:16:40 +09:00 committed by GitHub
commit 2ee3a2f55a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,8 +27,8 @@ var ChromeObject = function() {
this.binPath = null; this.binPath = null;
this.profileName = "Default"; this.profileName = "Default";
this.userDataDir = null; this.userDataDir = null; // Default set to null after 0.2.7.54; change via .setUserDataDir.
this.defaultUserDataDir = null; this.defaultUserDataDir = null; // Set by .setPublisherName; not frequently referenced.
this.installedDir = "Chrome"; this.installedDir = "Chrome";
// proxy // proxy
@ -198,7 +198,12 @@ var ChromeObject = function() {
} }
cmd.push("\"--profile-directory=" + this.profileName + "\""); cmd.push("\"--profile-directory=" + this.profileName + "\"");
cmd.push("\"--user-data-dir=" + this.userDataDir + "\"");
// set user data directory
if (this.userDataDir != null) {
cmd.push("\"--user-data-dir=" + this.userDataDir + "\"");
}
cmd.push("\"" + url + "\""); cmd.push("\"" + url + "\"");
SHELL.createShoutcut(publisherName.get() + " (" + this.profileName + ")", cmd.join(' '), SYS.getCurrentScriptDirectory()); SHELL.createShoutcut(publisherName.get() + " (" + this.profileName + ")", cmd.join(' '), SYS.getCurrentScriptDirectory());
@ -300,7 +305,9 @@ var ChromeObject = function() {
} }
// set user data directory // set user data directory
cmd.push("\"--user-data-dir=" + this.userDataDir + "\""); if (this.userDataDir != null) {
cmd.push("\"--user-data-dir=" + this.userDataDir + "\"");
}
// choice user agent // choice user agent
if (this.userAgent == null && this.userAgents.length > 0) { if (this.userAgent == null && this.userAgents.length > 0) {
@ -1446,7 +1453,7 @@ exports.startDebugInPrivate = function(url, proxy, profileName, debuggingPort, i
exports.publisherName = publisherName; exports.publisherName = publisherName;
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.21"; exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.22";
exports.AUTHOR = "abuse@catswords.net"; exports.AUTHOR = "abuse@catswords.net";
exports.global = global; exports.global = global;
exports.require = global.require; exports.require = global.require;