button

ASCII art and alerts

  1. // ==UserScript==
  2. // @name button
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description ASCII art and alerts
  6. // @author no
  7. // @match *://*/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. const button = document.createElement('button');
  15. button.innerText = 'pointless button';
  16. button.style.position = 'fixed';
  17. button.style.top = '10px';
  18. button.style.right = '10px';
  19. button.style.zIndex = '1000';
  20. document.body.appendChild(button);
  21.  
  22. button.addEventListener('click', function() {
  23. const frames = [
  24. "ASCII Frame 1",
  25. "ASCII Frame 2",
  26. "ASCII Frame 3",
  27. // Add more frames as needed
  28. ];
  29.  
  30. let index = 0;
  31. const playFrame = () => {
  32. if (index < frames.length) {
  33. alert(frames[index]);
  34. index++;
  35. setTimeout(playFrame, 1000); // Adjust the timing as needed
  36. }
  37. };
  38. playFrame();
  39. });
  40. })();

QingJ © 2025

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