mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2026-05-07 06:30:57 +08:00
New way to show/hide toolkits
This commit is contained in:
BIN
ElectronJS/EasySpider_en.crx
Normal file
BIN
ElectronJS/EasySpider_en.crx
Normal file
Binary file not shown.
BIN
ElectronJS/EasySpider_zh.crx
Normal file
BIN
ElectronJS/EasySpider_zh.crx
Normal file
Binary file not shown.
@@ -114,6 +114,7 @@ let handle_pairs = {};
|
||||
let socket_window = null;
|
||||
let socket_start = null;
|
||||
let socket_flowchart = null;
|
||||
let socket_popup = null;
|
||||
let invoke_window = null;
|
||||
|
||||
// var ffi = require('ffi-napi');
|
||||
@@ -1124,6 +1125,20 @@ async function beginInvoke(msg, ws) {
|
||||
} catch {
|
||||
console.log("Cannot get Cookies");
|
||||
}
|
||||
} else if (msg.type == 30) {
|
||||
send_message_to_browser(
|
||||
JSON.stringify({
|
||||
type: "showAllToolboxes"
|
||||
})
|
||||
);
|
||||
console.log("Show all toolboxes");
|
||||
} else if (msg.type == 31) {
|
||||
send_message_to_browser(
|
||||
JSON.stringify({
|
||||
type: "hideAllToolboxes"
|
||||
})
|
||||
);
|
||||
console.log("Hide all toolboxes");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1267,6 +1282,9 @@ wss.on("connection", function (ws) {
|
||||
// console.log("socket_flowchart closed");
|
||||
// });
|
||||
console.log("set socket_flowchart at time: ", new Date());
|
||||
} else if (msg.message.id == 3) {
|
||||
socket_popup = ws;
|
||||
console.log("set socket_popup at time: ", new Date());
|
||||
} else {
|
||||
//其他的ID是用来标识不同的浏览器标签页的
|
||||
// await new Promise(resolve => setTimeout(resolve, 200));
|
||||
|
||||
Reference in New Issue
Block a user