From 19d4cdce6cba3c86dddf7646610f9e8c88b15ef9 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 1 Jun 2025 21:39:13 +0900 Subject: [PATCH] Update chrome.js --- lib/chrome.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/chrome.js b/lib/chrome.js index 9df5528..02ad636 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -297,11 +297,11 @@ var ChromeObject = function() { // set user agent if (this.userAgent != null) { - cmd.push("--user-agent=\"" + this.userAgent + "\""); + cmd.push("\"--user-agent=" + this.userAgent + "\""); } // set the URL - cmd.push((!this.isAppMode ? "\"" : "--app=\"") + url + "\""); + cmd.push((this.isAppMode ? "--app=\"" : "\"") + url + "\""); // build the command line console.log(cmd.join(" ")); @@ -313,7 +313,7 @@ var ChromeObject = function() { // release shell shell.release(); } catch (e) { - console.error(e.message, ", Error in ChromeObject.open()"); + console.error("Error opening a browser: " + e.message); sleep(300); } @@ -326,7 +326,7 @@ var ChromeObject = function() { if (this.debuggingPort > 0) { try { var responseText = HTTP.get("http://127.0.0.1:" + this.debuggingPort + "/json"); - var pageList = JSON.parse(responseText); + pageList = JSON.parse(responseText); this.pageList = pageList; // save the page list } catch (e) { @@ -1245,11 +1245,11 @@ var ChromeObject = function() { // @deprecated this.setVendor = function(vendor) { this.setPublisherName(vendor); - console.warn("Deprecated: setVendor, Alternative: setPublisherName"); + console.warn("Deprecated: Please use setPublisherName"); }; this.setPublisherName = function(publisherName) { - var publisherName = publisherName.toLowerCase(); + publisherName = publisherName.toLowerCase(); switch (publisherName) { case "msedge":