SHARE
TWEET

AFK Papapoints

a guest Nov 19th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         TTVGA
  3. // @namespace    std KEKW
  4. // @version      3
  5. // @description  Clicks the gift button thingy.
  6. // @author       u/cognitively_edgy
  7. // @match        *://www.twitch.tv/*
  8. // ==/UserScript==
  9.  
  10. var chatButtonsCollection;
  11. var giftBtnCollection;
  12.  
  13. function main() {
  14.     chatButtonsCollection = document.getElementsByClassName("chat-input__buttons-container tw-flex tw-justify-content-between tw-mg-t-1")
  15.     if (chatButtonsCollection.length > 0) {
  16.         giftBtnCollection = chatButtonsCollection[0].getElementsByClassName("tw-button tw-button--success tw-interactive");
  17.         if (giftBtnCollection.length > 0) {
  18.             giftBtnCollection[0].click();
  19.             console.log("TTVGA clicked!");
  20.         }
  21.     }
  22. }
  23.  
  24. setInterval(main, 1500);
  25. console.log("TTVGA ready");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top