metal4chan

Emoticons for Vidya4chan. Done by CoF for MetalxXxGear.

目前為 2015-01-07 提交的版本,檢視 最新版本

// ==UserScript==
// @name         metal4chan
// @namespace    http://use.i.E.your.homepage/
// @version      3.7
// @description  Emoticons for Vidya4chan. Done by CoF for MetalxXxGear.
// @match        http://instasynch.com/*
// @grant        none
// @copyright    2015
// ==/UserScript==
 
//{ src:"", width:, height:, title:''},
 
var oldOnConnected = window.global.onConnected,
    emotes = [
   
    { src:"http://i.imgur.com/1tME9i9.gif", width:50, height:49, title:'mako'},
    { src:"http://i.imgur.com/EOJVmvF.gif", width:53, height:55, title:'skeletal'},
    { src:"http://i.imgur.com/xv1O1si.gif", width:45, height:48, title:'ryu'},
    { src:"http://i.imgur.com/Q029MEI.gif", width:62, height:50, title:'dubass'},
    { src:"http://i.imgur.com/IcHOs.gif", width:62, height:50, title:'harahu'},
    { src:"http://i.imgur.com/bQJOClf.gif", width:62, height:50, title:'shotgun'},
    { src:"http://i.imgur.com/3VeLz9S.gif", width:62, height:50, title:'xenomorph'},
    { src:"http://i.imgur.com/jxX66P1.gif", width:62, height:50, title:'nigger'},
    { src:"http://i.imgur.com/ojpDDL6.gif", width:62, height:50, title:'ghost'},
    { src:"http://i.imgur.com/JvRiObq.gif", width:62, height:50, title:'anime'},
    { src:"http://i.imgur.com/3EbZG8T.gif", width:62, height:50, title:'booty'},
    { src:"http://i.imgur.com/RKDtQWt.gif", width:62, height:50, title:'clapping'},
    { src:"http://i.imgur.com/KYk8suv.gif", width:62, height:50, title:'stop2'},
    { src:"http://i.imgur.com/B6bBva0.gif", width:45, height:45, title:'yoshi'},
    { src:"http://i.imgur.com/F5qdDtE.gif", width:125, height:45, title:'kabi'},
    { src:"http://i.imgur.com/mkoBhqm.gif", width:55, height:65, title:'blue'},
    { src:"http://i.imgur.com/eqmUDB6.gif", width:52, height:50, title:'her'},
    { src:"http://i.imgur.com/ZsVKjbE.gif", width:68, height:50, title:'2scooby'},
    { src:"http://i.imgur.com/FBcmjnJ.gif", width:75, height:43, title:'penguin'},
    { src:"http://i.imgur.com/199ZHvl.gif", width:54, height:55, title:'strut'},
    { src:"http://i.imgur.com/ARJzqWc.gif", width:54, height:55, title:'kitty2'},
    { src:"http://i.imgur.com/aQP4djX.gif", width:54, height:55, title:'anime2'},
    { src:"http://i.imgur.com/cqlff3P.gif", width:54, height:55, title:'pandadance'},
    { src:"http://i.imgur.com/Y71EUG3.gif", width:54, height:55, title:'arthur'},
    { src:"http://i.imgur.com/7OJcsQo.gif", width:54, height:55, title:'anime3'},
    { src:"http://i.imgur.com/VeeZhQK.gif", width:54, height:55, title:'comfydog'},
    { src:"http://i.imgur.com/WkdS2Vf.gif", width:54, height:55, title:'miku3'},
    { src:"http://i.imgur.com/cT9fiY2.gif", width:54, height:55, title:'anime4'}
    { src:"http://i.imgur.com/FSVkUzE.gif", width:54, height:55, title:'chen2'}

    
    ];
 
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();
}