Ping mod

Displays ping on moomoo.io, ensuring pingDisplay appears on screen

  1. // ==UserScript==
  2. // @name Ping mod
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.4
  5. // @description Displays ping on moomoo.io, ensuring pingDisplay appears on screen
  6. // @author Guilherme
  7. // @match *://moomoo.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Function to remove the "hidden" and ensure the pingDisplay is displayed
  15. function showPing() {
  16. let pingElement = document.getElementById('pingDisplay');
  17.  
  18. if (pingElement) {
  19. // Remove any styling that may be hiding the element
  20. pingElement.removeAttribute('hidden'); // Remove "hidden"
  21. pingElement.style.display = 'block'; // Make sure it is visible
  22. pingElement.style.visibility = 'visible'; // Force visibility
  23. pingElement.style.opacity = '1'; // Make sure it's not invisible
  24.  
  25. // Define visual styles
  26. pingElement.style.position = 'absolute';
  27. pingElement.style.top = '10px';
  28. pingElement.style.left = '10px';
  29. pingElement.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
  30. pingElement.style.color = 'white';
  31. pingElement.style.padding = '5px';
  32. pingElement.style.borderRadius = '5px';
  33. pingElement.style.zIndex = '9999'; // Ensures it is above other elements
  34. pingElement.style.fontSize = '16px'; // Set the font size
  35. pingElement.style.fontFamily = 'Arial, sans-serif'; // Clean font
  36. pingElement.style.width = 'auto'; //Adjusts the width to the content
  37. pingElement.style.textAlign = 'center'; // Center the text
  38.  
  39. console.log('Ping exibido corretamente!');
  40. } else {
  41. console.log('Elemento de ping não encontrado.');
  42. }
  43. }
  44.  
  45. // Checks and displays ping immediately after page load
  46. window.onload = function() {
  47. showPing();
  48. };
  49. })();

QingJ © 2025

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