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
import parse from 'twitch-emoji'; | |
import bttv from './bttv.json'; // https://api.betterttv.net/emotes | |
// it's a mess, just... don't... please... save us | |
function emoteParser (msg) { | |
let _msg = msg; | |
msg.split(/\s+/).map(t => { | |
bttv.emotes.filter(emote => t === emote.regex).map(e => { | |
if (e.url && e.url.length > 0) { |
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
// phantomjs code to log in to Amazon | |
// based on the code from this Stackoverflow answer: http://stackoverflow.com/questions/9246438/how-to-submit-a-form-using-phantomjs | |
// I'm injecting jQuery so this assumes you have jquery in your project directory | |
var page = new WebPage(), testindex = 0, loadInProgress = false; | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; |