Last active
January 27, 2022 14:46
-
-
Save JustMrPhoenix/9d0aa081d368d57bbc472c5d9bd5f309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name pantsgrab | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description pantsgrab | |
// @author pantsgrab | |
// @downloadURL https://gist.github.com/JustMrPhoenix/9d0aa081d368d57bbc472c5d9bd5f309/raw/99f275852fd848c7929048729c25ad760c8b303c/pantsgrab.user.js | |
// @updateURL https://gist.github.com/JustMrPhoenix/9d0aa081d368d57bbc472c5d9bd5f309/raw/99f275852fd848c7929048729c25ad760c8b303c/pantsgrab.user.js | |
// @match https://www.twitch.tv/vrossan | |
// @icon https://www.google.com/s2/favicons?domain=twitch.tv | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let ffzWaiter = setInterval( () => { | |
if(!window.ffz || !window.ffz.__modules || !window.ffz.__modules.chat || Object.keys(window.ffz.__modules.chat.rooms).length == 0) { | |
return; | |
} | |
clearInterval(ffzWaiter); | |
try { | |
pantsgrab(); | |
} catch (error) { | |
console.error("PantsGrab failed", error); | |
} | |
}, 1000) | |
let pantsgrab = () => { | |
let chat = window.ffz.__modules.chat; | |
let pantsgrabId = '6137f114af28e956864c7b8d'; | |
Object.keys(chat.rooms)[0].toLowerCase() == "vrossan" | |
chat.emotes.addDefaultSet('pantsgrab', 'pantsgrabb', { | |
title: 'PantsGrab', | |
source: 'PantsGrab', | |
icon: `https://cdn.betterttv.net/emote/${pantsgrabId}/2x`, | |
emotes: [{ | |
urls: { | |
1: `https://cdn.betterttv.net/emote/${pantsgrabId}/1x`, | |
2: `https://cdn.betterttv.net/emote/${pantsgrabId}/2x`, | |
4: `https://cdn.betterttv.net/emote/${pantsgrabId}/3x`, | |
}, | |
id: pantsgrabId, | |
name: 'PantsGrab', | |
width: 28, | |
height: 28, | |
owner: { | |
display_name: 'pantsgrab', | |
name: 'pantsgrab', | |
}, | |
require_spaces: false, | |
click_url: `https://betterttv.com/emotes/${pantsgrabId}` | |
}] | |
}); | |
console.log('PantsGrab') | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment