metal4chan

Emoticons for Vidya4chan. Done by CoF for MetalxXxGear.

当前为 2015-02-20 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name metal4chan
  3. // @namespace http://use.i.E.your.homepage/
  4. // @version 4.59
  5. // @description Emoticons for Vidya4chan. Done by CoF for MetalxXxGear.
  6. // @match http://instasync.com/*
  7. // @grant none
  8. // @copyright 2015
  9. // ==/UserScript==
  10. //{ src:"", width:, height:, title:''},
  11. var oldOnConnected = window.global.onConnected,
  12. emotes = [
  13. { src:"http://i.imgur.com/1tME9i9.gif", width:50, height:49, title:'mako'},
  14. { src:"http://i.imgur.com/EOJVmvF.gif", width:53, height:55, title:'skeletal'},
  15. { src:"http://i.imgur.com/xv1O1si.gif", width:45, height:48, title:'ryu'},
  16. { src:"http://i.imgur.com/Q029MEI.gif", width:62, height:50, title:'dubass'},
  17. { src:"http://i.imgur.com/IcHOs.gif", width:62, height:50, title:'harahu'},
  18. { src:"http://i.imgur.com/B6bBva0.gif", width:45, height:45, title:'yoshi'},
  19. { src:"http://i.imgur.com/F5qdDtE.gif", width:125, height:45, title:'kabi'},
  20. { src:"http://i.imgur.com/mkoBhqm.gif", width:55, height:65, title:'blue'},
  21. { src:"http://i.imgur.com/eqmUDB6.gif", width:52, height:50, title:'her'},
  22. { src:"http://i.imgur.com/ZsVKjbE.gif", width:68, height:50, title:'2scooby'},
  23. { src:"http://i.imgur.com/FBcmjnJ.gif", width:75, height:43, title:'penguin'},
  24. { src:"http://i.imgur.com/199ZHvl.gif", width:54, height:55, title:'strut'},
  25. { src:"http://i.imgur.com/ARJzqWc.gif", width:54, height:55, title:'kitty2'},
  26. { src:"http://i.imgur.com/FSVkUzE.gif", width:54, height:55, title:'chen2'},
  27. { src:"http://i.imgur.com/S417M86.gif", width:54, height:55, title:'buttjuice'},
  28. { src:"http://i.imgur.com/ELQA2fB.gif", width:54, height:55, title:'notabotnet'},
  29. { src:"http://i.imgur.com/HOdSCiN.gif", width:54, height:55, title:'laughinganime'},
  30. { src:"http://i.imgur.com/giQjsb3.gif", width:54, height:55, title:'mememe'},
  31. { src:"http://i.imgur.com/7VcUcYJ.gif", width:54, height:55, title:'duckgif'},
  32. { src:"http://i.imgur.com/wAVQL4D.gif", width:60, height:47, title:'wop'},
  33. { src:"http://i.imgur.com/l1jmNIC.gif", width:60, height:47, title:'miku3'},
  34. { src:"http://i.imgur.com/RgnpAPE.gif", width:45, height:59, title:'ayylien'},
  35. { src:"http://i.imgur.com/7AyGv1a.gif", width:60, height:74, title:'ayylmao'},
  36. { src:"http://i.imgur.com/8WGVGYh.gif", width:35, height:59, title:'cyrax'},
  37. { src:"http://i.imgur.com/XNCKzV8.gif", width:40, height:60, title:'respectfulnod'},
  38. { src:"http://i.imgur.com/MMdhwkH.gif", width:40, height:60, title:'cry'},
  39. { src:"http://i.imgur.com/HWYBpFp.gif", width:50, height:60, title:'thom'},
  40. { src:"http://i.imgur.com/kauEfnn.gif", width:50, height:60, title:'marissa'},
  41. { src:"http://i.imgur.com/RRPNiqa.gif", width:50, height:60, title:'reimu'},
  42. { src:"http://i.imgur.com/yzImse8.png", width:17, height:22, title:'myminisides'},
  43. { src:"http://i.imgur.com/4wunBBM.png", width:60, height:52, title:'slut'},
  44. { src:"http://i.imgur.com/Gx5wmqn.gif", width:67, height:50, title:'wow2'},
  45. { src:"http://i.imgur.com/nfDwcil.png", width:40, height:56, title:'gookfood'},
  46. { src:"http://i.imgur.com/l1jmNIC.gif", width:60, height:60, title:'miku3'},
  47.  
  48. ];
  49. function addEmotes(){
  50. for(var i = 0; i < emotes.length; i += 1){
  51. var parameter = emotes[i];
  52. window.$codes[parameter.title] = $('<img>', parameter)[0].outerHTML;
  53. }
  54. }
  55. //load emotes everytime we connect to a room
  56. //makes sure emotes work even after going to the frontpage and back
  57. window.global.onConnected = function () {
  58. oldOnConnected();
  59. addEmotes();
  60. };
  61. //check if we are already connected and the script just loaded slow
  62. if(typeof(window.userInfo) !== 'undefined' && window.userInfo !== null){
  63. addEmotes();
  64. }