Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Snugcoin Ante
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description adds a convenient button for degenerate gamblers
- // @author deepstate
- // @match http://cytu.be/r/sleepsnug
- // @match https://cytu.be/r/sleepsnug
- // @match http://www.cytu.be/r/sleepsnug
- // @match https://www.cytu.be/r/sleepsnug
- // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- const chathandle = document.getElementById("chatline");
- const enterpress = new KeyboardEvent('keydown', {
- bubbles: true, cancelable: true, keyCode: 13
- });
- const newbutton = document.createElement("li");
- const buttontext = document.createElement("a");
- buttontext.href = "javascript:void(0)";
- buttontext.onclick = function(){
- chathandle.value = "/snugcoin ante";
- chathandle.dispatchEvent(enterpress);
- }
- buttontext.appendChild(document.createTextNode("Snugcoin Ante"));
- newbutton.appendChild(buttontext);
- const list = document.getElementsByClassName("navbar-nav");
- list.item(0).appendChild(newbutton);
- })();
Add Comment
Please, Sign In to add comment