adds emotes
当前为
// ==UserScript==
// @name Instasynch emotes loader
// @namespace Bibby
// @description adds emotes
// @version 1.05
// @license MIT
// @author Zod-
// @grant none
// @include http://*.instasynch.com/*
// @include http://instasynch.com/*
// @include http://*.instasync.com/*
// @include http://instasync.com/*
// ==/UserScript==
var oldOnConnected = window.global.onConnected,
emotes = [
//{ src:"http://i.imgur.com/uWCIsFe.jpg", width:55, height:55, title:'anita'},
//{ src:"http://i.imgur.com/uWCIsFe.jpg", width:55, height:55, title:'anita'}
];
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();
}