XandY

This code tracks your curser on the webpage and shows you your X and Y coordinates. Feel free to change the code!

  1. // ==UserScript==
  2. // @name XandY
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description This code tracks your curser on the webpage and shows you your X and Y coordinates. Feel free to change the code!
  6. // @author -{Abyss⌬}-ora
  7. // @match https://gf.qytechs.cn/en/scripts/414921-xandy
  8. // @match https://diep.io/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. window.addEventListener('mousemove', function (e) {document.getElementById('x-value').textContent = e.x;document.getElementById('y-value').textContent = e.y;});
  16. var xAndY = document.createElement('div');
  17. document.getElementsByTagName('body')[0].appendChild(xAndY);
  18. xAndY.style = "position:absolute; pointer-events: none; top:-10px; left:300px; font-family: 'Monoton', cursive; color: #FFFFFF; font-size: 20px; text-shadow: black 0px 1px, purple 0px 2px, pink 0px 3px";
  19. xAndY.innerHTML = `<p>-{Abyss⌬}-ora's &#160; XandY! &#160; &#160; X: <span id="x-value"></span> Y: <span id="y-value"></span></p> <style>@import url('https://fonts.googleapis.com/css2?family=Monoton&display=swap');</style>`;
  20.  
  21. })();

QingJ © 2025

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