diff --git a/lib/chrome.js b/lib/chrome.js index 18cc6fa..5da15df 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -27,8 +27,8 @@ var ChromeObject = function() { this.binPath = null; this.profileName = "Default"; - this.userDataDir = null; - this.defaultUserDataDir = null; + this.userDataDir = null; // Default set to null after 0.2.7.54; change via .setUserDataDir. + this.defaultUserDataDir = null; // Set by .setPublisherName; not frequently referenced. this.installedDir = "Chrome"; // proxy @@ -198,7 +198,12 @@ var ChromeObject = function() { } 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 + "\""); SHELL.createShoutcut(publisherName.get() + " (" + this.profileName + ")", cmd.join(' '), SYS.getCurrentScriptDirectory()); @@ -300,7 +305,9 @@ var ChromeObject = function() { } // 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 if (this.userAgent == null && this.userAgents.length > 0) { @@ -1446,7 +1453,7 @@ exports.startDebugInPrivate = function(url, proxy, profileName, debuggingPort, i 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.global = global; exports.require = global.require;