Guest User

Untitled

a guest
Mar 15th, 2023
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Snugcoin Ante
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description adds a convenient button for degenerate gamblers
  6. // @author deepstate
  7. // @match http://cytu.be/r/sleepsnug
  8. // @match https://cytu.be/r/sleepsnug
  9. // @match http://www.cytu.be/r/sleepsnug
  10. // @match https://www.cytu.be/r/sleepsnug
  11. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. const chathandle = document.getElementById("chatline");
  19. const enterpress = new KeyboardEvent('keydown', {
  20. bubbles: true, cancelable: true, keyCode: 13
  21. });
  22.  
  23. const newbutton = document.createElement("li");
  24.  
  25. const buttontext = document.createElement("a");
  26. buttontext.href = "javascript:void(0)";
  27.  
  28. buttontext.onclick = function(){
  29. chathandle.value = "/snugcoin ante";
  30.  
  31. chathandle.dispatchEvent(enterpress);
  32. }
  33.  
  34. buttontext.appendChild(document.createTextNode("Snugcoin Ante"));
  35.  
  36. newbutton.appendChild(buttontext);
  37.  
  38. const list = document.getElementsByClassName("navbar-nav");
  39. list.item(0).appendChild(newbutton);
  40.  
  41. })();
Add Comment
Please, Sign In to add comment