InstaEmotes

New maymays for you to love! Done by Man_of_Feel :^)

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

  1. // ==UserScript==
  2. // @name InstaEmotes
  3. // @namespace http://use.i.E.your.homepage/
  4. // @version 5.4.1
  5. // @description New maymays for you to love! Done by Man_of_Feel :^)
  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/RpznRYJ.gif", width:40, 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:'heil'},
  18. { src:"http://i.imgur.com/IADYHCP.png", width:58, height:58, title:'puke'},
  19. { src:"http://i.imgur.com/fNkI3M5.gif", width:40, height:60, title:'ayylien'},
  20. { src:"http://i.imgur.com/fNkI3M5.gif", width:40, height:60, title:'ayy'},
  21. { src:"http://i.imgur.com/fNkI3M5.gif", width:40, height:60, title:'ayylmao'},
  22. { src:"http://i.imgur.com/nfDwcil.png", width:41, height:58, title:'gookfood'},
  23. { src:"http://i.imgur.com/BeaCBjD.png", width:37, height:40, title:'feek'},
  24. { src:"http://i.imgur.com/BeaCBjD.png", width:37, height:40, title:'feeksbadman'},
  25. { src:"http://i.imgur.com/cHKfWEJ.gif", width:70, height:53, title:'4u'},
  26. { src:"http://i.imgur.com/0qGr3WP.png", width:52, height:52, title:'topkek'},
  27. { src:"http://i.imgur.com/AXugRz8.png", width:39, height:45, title:'cunt'},
  28. { src:"http://i.imgur.com/qzKaSUr.png", width:35, height:36, title:'333'},
  29. { src:"http://i.imgur.com/og9In6D.png", width:43, height:40, title:'feelssmug'},
  30. { src:"http://i.imgur.com/tIoQzQX.png", width:34, height:45, title:'yuropoor'}
  31.  
  32. ];
  33.  
  34. function addEmotes(){
  35. for(var i = 0; i < emotes.length; i += 1){
  36. var parameter = emotes[i];
  37. window.$codes[parameter.title] = $('<img>', parameter)[0].outerHTML;
  38. }
  39. }
  40.  
  41. //load emotes everytime we connect to a room
  42. //makes sure emotes work even after going to the frontpage and back
  43. window.global.onConnected = function () {
  44. oldOnConnected();
  45. addEmotes();
  46. };
  47. //check if we are already connected and the script just loaded slow
  48. if(typeof(window.userInfo) !== 'undefined' && window.userInfo !== null){
  49. addEmotes();
  50. }