Update chrome.js

This commit is contained in:
Namhyeon Go 2023-12-27 03:51:35 +09:00 committed by GitHub
parent 80dfe4c915
commit 9c1250ac22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1183,6 +1183,7 @@ var ChromeObject = function(interfaces) {
return this.evaluate('__getWindow().addEventListener("click",function(e){var t=e.clientX,n=e.clientY,l=__getDocument().createElement("div");l.style.position="absolute",l.style.width="20px",l.style.height="20px",l.style.backgroundColor="#00ff00",l.style.zIndex=99999,l.style.top=__getWindow().pageYOffset+n-10+"px",l.style.left=__getWindow().pageXOffset+t-10+"px",__getDocument().body.appendChild(l)});');
};
// Added in 2023-12-27
this.markPosition = function(x, y) {
return this.evaluate('(function(x, y){var t=x,n=y,l=__getDocument().createElement("div");l.style.position="absolute",l.style.width="20px",l.style.height="20px",l.style.backgroundColor="#ff0000",l.style.zIndex=99999,l.style.top=__getWindow().pageYOffset+n-10+"px",l.style.left=__getWindow().pageXOffset+t-10+"px",__getDocument().body.appendChild(l)})(' + parseInt(x) + ', ' + parseInt(y) + ');');
};