Man_of_Feel's super amazing emotes!

New v4c maymays for you to love!

目前为 2014-10-15 提交的版本。查看 最新版本

// ==UserScript==
// @name         Man_of_Feel's super amazing emotes!
// @namespace    http://use.i.E.your.homepage/
// @version      4.1.3
// @description  New v4c maymays for you to love!
// @match        http://instasynch.com/*
// @grant        none
// @copyright    2014
// ==/UserScript==

//{ src:"", width:, height:, title:''},

var oldOnConnected = window.global.onConnected,
    emotes = [
    
    { src:"http://i.imgur.com/ZtqjVDC.jpg", width:37, height:50, title:'yee'},
    { src:"http://i.imgur.com/6oThPdS.gif", width:49, height:54, title:'tip'},
    { src:"http://i.imgur.com/aQVYETD.png", width:50, height:45, title:'taylor'},
    { src:"http://i.imgur.com/C8ydfXw.jpg", width:55, height:55, title:'puke'}

    ];

function addEmotes(){
    for(var i = 0; i < emotes.length; i += 1){
        var parameter = emotes[i];
        window.$codes[parameter.title] = $('<img>', parameter)[0].outerHTML;
    }
}

//load emotes everytime we connect to a room
//makes sure emotes work even after going to the frontpage and back
window.global.onConnected = function () {
    oldOnConnected();
    addEmotes();
};
//check if we are already connected and the script just loaded slow
 if(typeof(window.userInfo) !== 'undefined' && window.userInfo !== null){
    addEmotes();
}