mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-06-06 21:29:02 +00:00
Update chrome.js
This commit is contained in:
parent
821b3748df
commit
19d4cdce6c
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue
Block a user