diff --git a/lib/base.js b/lib/base.js index 7cbf5c7d..63602837 100644 --- a/lib/base.js +++ b/lib/base.js @@ -25,7 +25,7 @@ Volcanos("base", {help: "基础模块", return parseInt(size / 1000000) + "." + parseInt(size / 10000 % 100) + "M" } if (size > 1000) { - return parseInt(size / 1000) + "." + parseInt(size / 10 % 100) + "M" + return parseInt(size / 1000) + "." + parseInt(size / 10 % 100) + "K" } return size + "B" }, diff --git a/plugin/chrome/chrome.js b/plugin/chrome/chrome.js index 32f3c61e..d1a70e04 100644 --- a/plugin/chrome/chrome.js +++ b/plugin/chrome/chrome.js @@ -116,7 +116,7 @@ var can = Volcanos("chrome", { message: message, title: title||Config.title, iconUrl: "/favicon.ico", type: "basic", })}, - can.socket = can.socket || can.misc.WSS(can, "ws://localhost:9020/space/", {node: "chrome", name: chrome.runtime.id}, function(event, msg) { + can.misc.WSS(can, "ws://localhost:9020/space/", {node: "chrome", name: chrome.runtime.id}, function(event, msg) { if (msg.Option("_handle")) {return can.user.toast(msg.result.join(""))} can.user.toast(msg.detail.join(" "))