mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-16 16:26:56 +08:00
操作台右下角关闭按钮
This commit is contained in:
parent
e0de56633d
commit
f453dce9fd
Binary file not shown.
Binary file not shown.
1
ElectronJS/tasks/187.json
Normal file
1
ElectronJS/tasks/187.json
Normal file
@ -0,0 +1 @@
|
||||
{"id":187,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"7/17/2023, 2:29:10 PM","update_time":"7/17/2023, 2:29:10 PM","version":"0.3.6","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://www.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.jd.com"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":3,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"Field[\"OCR\"]","value":"Field[\"OCR\"]"}],"outputParameters":[{"id":0,"name":"OCR","desc":"","type":"text","recordASField":0,"exampleValue":"/手机/数码"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://www.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":8,"relative":false,"name":"OCR","desc":"","extractType":0,"relativeXPath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","//div[contains(., '/手机/数码')]","//DIV[@class='LeftSide_menu_item__SBMWC LeftSide_text_space__2UhbG LeftSide_menu_hover__OCHiO']","/html/body/div[last()-6]/div/div[last()-4]/div/div[last()-2]/div/div/div/div[last()-1]/div[last()-12]"],"exampleValues":[{"num":0,"value":"/手机/数码"}],"unique_index":"mf51k6v4mcnlk6hiucm","iframe":false,"default":"","paraType":"text","recordASField":0,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":3,"index":3,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"Field[\"OCR\"]","index":0,"allXPaths":["/html/body/div[4]/div[1]/div[2]/div[1]/input[1]","//input[contains(., '')]","id(\"key\")","//INPUT[@class='text defcolor']","/html/body/div[last()-7]/div/div[last()-2]/div/input"]}}]}
|
2
ExecuteStage/.vscode/launch.json
vendored
2
ExecuteStage/.vscode/launch.json
vendored
@ -12,7 +12,7 @@
|
||||
"justMyCode": false,
|
||||
// "args": ["--id", "[7]", "--read_type", "remote", "--headless", "0"]
|
||||
// "args": ["--id", "[9]", "--read_type", "remote", "--headless", "0", "--saved_file_name", "YOUTUBE"]
|
||||
"args": ["--id", "[63]", "--headless", "0", "--user_data", "1", "--keyboard", "0"]
|
||||
"args": ["--id", "[68]", "--headless", "0", "--user_data", "1", "--keyboard", "0"]
|
||||
}
|
||||
]
|
||||
}
|
@ -32,9 +32,9 @@ global.tdiv.style.width = "3000px";
|
||||
global.tdiv.style.height = "3000px";
|
||||
global.tdiv.style.pointerEvents = "none";
|
||||
|
||||
var mousemovebind = false; //如果出现元素默认绑定了mousemove事件导致匹配不到元素的时候,开启第二种模式获得元素
|
||||
let mousemovebind = false; //如果出现元素默认绑定了mousemove事件导致匹配不到元素的时候,开启第二种模式获得元素
|
||||
|
||||
var toolkit = document.createElement("div");
|
||||
let toolkit = document.createElement("div");
|
||||
toolkit.classList = "tooltips"; //添加样式
|
||||
// @ts-ignore
|
||||
// if(isInIframe()){
|
||||
@ -44,7 +44,7 @@ toolkit.setAttribute("id", "wrapperToolkit");
|
||||
// }
|
||||
|
||||
|
||||
var tooltips = false; //标记鼠标是否在提示框上
|
||||
let tooltips = false; //标记鼠标是否在提示框上
|
||||
|
||||
//右键菜单屏蔽
|
||||
document.oncontextmenu = () => false;
|
||||
@ -54,12 +54,12 @@ document.addEventListener("mousemove", function() {
|
||||
}
|
||||
|
||||
//如果鼠标在元素框内则点击和选中失效
|
||||
var x = event.clientX;
|
||||
var y = event.clientY;
|
||||
var divx1 = toolkit.offsetLeft;
|
||||
var divy1 = toolkit.offsetTop;
|
||||
var divx2 = toolkit.offsetLeft + toolkit.offsetWidth;
|
||||
var divy2 = toolkit.offsetTop + toolkit.offsetHeight;
|
||||
let x = event.clientX;
|
||||
let y = event.clientY;
|
||||
let divx1 = toolkit.offsetLeft;
|
||||
let divy1 = toolkit.offsetTop;
|
||||
let divx2 = toolkit.offsetLeft + toolkit.offsetWidth;
|
||||
let divy2 = toolkit.offsetTop + toolkit.offsetHeight;
|
||||
if (x >= divx1 && x <= divx2 && y >= divy1 && y <= divy2) {
|
||||
tooltips = true;
|
||||
return;
|
||||
@ -174,7 +174,7 @@ toolkit.addEventListener("mousedown", function(e) { e.stopPropagation(); }); //
|
||||
document.body.append(global.div); //默认如果toolkit不存在则div和tdiv也不存在
|
||||
document.body.append(global.tdiv);
|
||||
document.body.append(toolkit);
|
||||
var timer;
|
||||
let timer;
|
||||
|
||||
|
||||
|
||||
@ -299,3 +299,7 @@ function generateToolkit() {
|
||||
//Vue元素
|
||||
generateToolkit();
|
||||
|
||||
let closeButton = document.getElementById("closeButton");
|
||||
closeButton.addEventListener("click", function() {
|
||||
toolkit.style.display = "none"; // 隐藏元素
|
||||
});
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div id="realcontent">
|
||||
<!-- <div id="EasySpiderResizer" style="width: 10px; height: 10px; background-color: black; position: absolute; left: 0; bottom: 0; cursor: ne-resize;"></div>-->
|
||||
<div id="EasySpiderResizer" style="width: 10px; height: 10px; position: absolute; left: 0; top: 0; cursor: nw-resize;"></div>
|
||||
<span id="closeButton">✖</span>
|
||||
<div v-if="lang == 'zh'">
|
||||
<div class="tooldrag">✍操作台(点此拖动,左上角调整大小)</div>
|
||||
<div class="realcontent">
|
||||
|
@ -4,7 +4,6 @@
|
||||
"description": "EasySpider's chrome extension",
|
||||
"author": "Naibo Wang",
|
||||
"manifest_version": 3,
|
||||
"persistent": true,
|
||||
"action": {
|
||||
"default_icon": {
|
||||
"16": "assets/icon-16.png",
|
||||
|
@ -171,3 +171,15 @@
|
||||
.toolkitcontain .toolkittb4 {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#closeButton {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
opacity: 0.05;
|
||||
}
|
||||
#closeButton:hover {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user