Man_of_Feel's super amazing emotes!

New v4c maymays for you to love!

当前为 2014-10-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Man_of_Feel's super amazing emotes!
  3. // @namespace http://use.i.E.your.homepage/
  4. // @version 4.4
  5. // @description New v4c maymays for you to love!
  6. // @match http://instasynch.com/*
  7. // @grant none
  8. // @copyright 2014
  9. // ==/UserScript==
  10.  
  11. //{ src:"", width:, height:, title:''},
  12.  
  13. var oldOnConnected = window.global.onConnected,
  14. emotes = [
  15. { src:"http://i.imgur.com/f4qHWHb.gif", width:32, height:45, title:'yee'},
  16. { src:"http://i.imgur.com/6oThPdS.gif", width:49, height:54, title:'tip'},
  17. { src:"http://i.imgur.com/eYfA30K.png", width:48, height:58, title:'taylor'},
  18. { src:"http://i.imgur.com/IADYHCP.png", width:58, height:58, title:'puke'},
  19. { src:"http://i.imgur.com/y8EcWE0.gif", width:40, height:60, title:'ayylien'},
  20. { src:"http://i.imgur.com/OJD5q2a.png", width:58, height:58, title:'gookfood'},
  21. { src:"http://i.imgur.com/txA8p8o.png", width:65, height:65, title:'cunt'}
  22.  
  23. ];
  24.  
  25. function addEmotes(){
  26. for(var i = 0; i < emotes.length; i += 1){
  27. var parameter = emotes[i];
  28. window.$codes[parameter.title] = $('<img>', parameter)[0].outerHTML;
  29. }
  30. }
  31.  
  32. //load emotes everytime we connect to a room
  33. //makes sure emotes work even after going to the frontpage and back
  34. window.global.onConnected = function () {
  35. oldOnConnected();
  36. addEmotes();
  37. };
  38. //check if we are already connected and the script just loaded slow
  39. if(typeof(window.userInfo) !== 'undefined' && window.userInfo !== null){
  40. addEmotes();
  41. }