Update chrome.js

This commit is contained in:
Namhyeon Go 2022-01-10 01:41:05 +09:00 committed by GitHub
parent 031846c2ba
commit 2776c57602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
/////////////////////////////////////////////////////////////////////////////////
var STD = require("lib/std");
var RAND = require("lib/rand");
var SHELL = require("lib/shell");
var SYS = require("lib/system");
var FILE = require("lib/file");
@ -64,9 +65,13 @@ var ChromeObject = function() {
return this;
};
this.clear = function() {
console.log("clear");
return FILE.deleteFolder(SHELL.getPathOfMyDocuments() + "\\UserData_Chrome_" + this.profileName + "\\" + this.profileName);
};
this.clearProfile = function() {
var FN = SHELL.getPathOfMyDocuments() + "\\UserData_Chrome_" + this.profileName + "\\" + this.profileName;
return FILE.deleteFolder(FN);
return this.clear();
};
this.setUserDataDir = function(dirname) {
@ -452,6 +457,7 @@ var ChromeObject = function() {
};
this.exit = function() {
console.log("exit");
return this.sendPageRPC("Browser.close", {});
};
@ -1111,6 +1117,6 @@ exports.startWithDebugging = function(url, proxy, profileName, debuggingPort) {
;
};
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.2";
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.1";
exports.global = global;
exports.require = global.require;