координаты кнопки bitcoinker

как получить координаты курсора мыши

  1. // ==UserScript==
  2. // @name координаты кнопки bitcoinker
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-10-15
  5. // @description как получить координаты курсора мыши
  6. // @author Dank Odze
  7. // @match https://bitcoinker.com/
  8. // @license MIT
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=bitcoinker.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13.  
  14.  
  15. var CaptchaSolverStatus = document.createElement('div');
  16. document.body.appendChild(CaptchaSolverStatus);
  17.  
  18. CaptchaSolverStatus.classList.add('captchasolver-status');
  19. document.body.appendChild(document.createElement('style')).textContent = (`
  20. .captchasolver-status {
  21. position: fixed;
  22. font-size: 20px !important;
  23. top: 140px !important;
  24. right: 20px;
  25. z-index: 9999;
  26. pointer-events: none;
  27. }
  28. `);
  29.  
  30. function setCaptchaSolverStatus(html, color) {
  31. if (color === 'green') {
  32. CaptchaSolverStatus.style.color = 'green';
  33. } else if (color === 'red') {
  34. CaptchaSolverStatus.style.color = 'red';
  35. } else {
  36. CaptchaSolverStatus.style.color = 'black';
  37. }
  38. CaptchaSolverStatus.innerHTML = html;
  39. }
  40.  
  41. setCaptchaSolverStatus('<p><b>Captcha Solver:</b> Activated.</p>', 'green');
  42. setCaptchaSolverStatus('<p><b>Captcha Solver:</b> Wait for picture...</p>', 'green')
  43. document.addEventListener('mousemove', event => {
  44. setCaptchaSolverStatus(event.clientX + ':' + event.clientY + '<br>' + event.screenX + ':' + event.screenY + '<br>' + event.pageX + ':' + event.pageY, 'green');
  45. console.log(event.clientX + ':' + event.clientY + '\r\n' + event.screenX + ':' + event.screenY + '\r\n' + event.pageX + ':' + event.pageY); // ЭТО должно сделать то, что вы хотите
  46. })
  47. /*
  48. Horizontal mouse position relative to viewport:
  49. click - клик левой кнопкой мыши по элементу, на сенсорных устройствах это касание;
  50. contextmenu - клик на элемент правой кнопкой мыши - вызов контекстного меню;
  51. mouseover / mouseout - наведение на элемент курсора мыши / курсор покидает элемент;
  52. mousemove - движение мыши;
  53.  
  54. document.addEventListener('mousemove', event => {
  55. console.log(event.clientY) // THIS should do what you want
  56. })
  57. complete list of options are:
  58.  
  59. e.clientY/Y: положение относительно области просмотра
  60. e.screenX/Y: положение относительно экрана
  61. e.pageX/Y: положение относительно страницы (отличается от области просмотра, если страница прокручивается)
  62. */

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址