DigDig.io AmongusFall

Add a snowfall effect to digdig.io with AMONGUS

  1. // ==UserScript==
  2. // @name DigDig.io AmongusFall
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Add a snowfall effect to digdig.io with AMONGUS
  6. // @author Your Name
  7. // @match *://digdig.io/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. const snowflakeStyle = `
  16. .snowflake {
  17. position: absolute;
  18. width: 30px;
  19. height: 30px;
  20. pointer-events: none;
  21. animation: fall linear infinite;
  22. }
  23.  
  24. @keyframes fall {
  25. from {
  26. transform: translateY(-30px) rotate(0deg);
  27. }
  28. to {
  29. transform: translateY(${window.innerHeight}px) rotate(360deg);
  30. }
  31. }
  32. `;
  33.  
  34. const styleElement = document.createElement('style');
  35. styleElement.type = 'text/css';
  36. styleElement.appendChild(document.createTextNode(snowflakeStyle));
  37. document.head.appendChild(styleElement);
  38.  
  39. // Función para crear un copo de nieve con la imagen de Among Us
  40. function createSnowflake() {
  41. const snowflake = document.createElement('img');
  42. snowflake.classList.add('snowflake');
  43. snowflake.src = 'https://i.imgur.com/fenZUbH.png';
  44. snowflake.style.left = Math.random() * window.innerWidth + 'px';
  45. snowflake.style.animationDuration = Math.random() * 5 + 2 + 's';
  46. document.body.appendChild(snowflake);
  47.  
  48. snowflake.addEventListener('animationiteration', () => {
  49. snowflake.remove();
  50. });
  51. }
  52.  
  53. function createSnowfall() {
  54. setInterval(createSnowflake, 500); // Agrega un nuevo copo cada medio segundo
  55. }
  56.  
  57. createSnowfall();
  58. })();

QingJ © 2025

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