Twitch Giveaway Chrome
Nightbot is a chat bot for Twitch and YouTube that allows you to automate your live stream's chat with moderation and new features, allowing you to spend more time entertaining your viewers.
May 29th, 2015
Twitch Giveaway Wheel
Never
- When a stream is loaded with Chrome dev tools open, I found queries to many hostnames, like mp.twitch.tv, usher.twitch.tv, api.twitch.tv, etc To narrow down the results, I decided to block these hostnames one at a time to see if they were important. I ended up with a few required ones, namely usher.twitch.tv.
- You need to enable JavaScript to run this app. You need to enable JavaScript to run this app.
- Twitch Prime is included with an Amazon Prime account but isn’t automatically activated. If you already use Twitch, you just have to link Twitch to your Prime account. It only takes a few steps to start claiming your free games and in-game items.
Twitch Giveaway Rules
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
- // if you open up developer tools in chrome and go to the console tab, you can paste
- // in this snippet of javascript it will get all ur users into an array and pick a random
- function httpGet(url){
- xmlHttp.open('GET', url,false);
- xmlHttp.setRequestHeader('Access-Control-Allow-Headers','*');
- xmlHttp.setRequestHeader('Content-type','application/ecmascript');
- xmlHttp.setRequestHeader('Access-Control-Allow-Origin','*');
- return xmlHttp.responseText;
- //set the twitch url: if u visit this url u will see all ur viewers in a json object format
- var url ='https://tmi.twitch.tv/group/user/venruki/chatters';
- //go get the json object and made it renderable
- var userJsonList = JSON.parse(userJsonListRaw);
- //set up an array we're gonna put the user list in
- //get the length of both the moderator section and viewer section
- var modCount = userJsonList.chatters.moderators.length;
- var viewerCount = userJsonList.chatters.viewers.length;
- //push all mods into the userArray
- userArray.push(userJsonList.chatters.moderators[i]);
- for(i=0; i < viewerCount; i++){
- userArray.push(userJsonList.chatters.viewers[i]);
- var roll =Math.floor((Math.random()* userArray.length)+1);
- //print a random name out of the user array based on that number
- //boom you have giveaways again without any chrome extensions!
Twitch Giveaway Overlay
RAW Paste Data