SomeCanadianScript

memes for the cool kids

Version au 11/09/2015. Voir la dernière version.

  1. // ==UserScript==
  2. // @name SomeCanadianScript
  3. // @namespace SomeCanadianEmotes
  4. // @version 1.1.1
  5. // @description memes for the cool kids
  6. // @grant none
  7. // @copyright 2015
  8. // @include *://*.instasynch.com/*
  9. // @include *://instasynch.com/*
  10. // @include *://*.instasync.com/*
  11. // @include *://instasync.com/*
  12. // ==/UserScript==
  13.  
  14. // { src:"", width:, height:, title:''},
  15. // { src:"", width:, height:, name:''},
  16.  
  17.  
  18. var emotes = [
  19. { src:"http://i.imgur.com/LgMX7Qd.gif", width:70, height:70, title:'myboy'},
  20. { src:"http://i.imgur.com/hv9pLeN.gif", width:65, height:65, title:'jose'},
  21. { src:"http://i.imgur.com/VBSo8yR.gif", width:70, height:70, title:'ballpark'},
  22. { src:"http://i.imgur.com/QOVenhw.gif", width:70, height:70, title:'nochance'},
  23. { src:"http://i.imgur.com/PLqvAyg.gif", width:65, height:65, title:'noway'},
  24. { src:"http://i.imgur.com/DRJmmtY.gif", width:60, height:80, title:'coolguy'},
  25. { src:"http://i.imgur.com/iFxNlWs.gif", width:65, height:70, title:'goforit'},
  26. { src:"http://i.imgur.com/qjKvhfL.png", width:60, height:60, title:'shake'},
  27. { src:"http://i.imgur.com/F96U5vU.png", width:65, height:65, title:'diklife'},
  28. { src:"http://i.imgur.com/7pHwlun.gif", width:60, height:80, title:'stripe'},
  29. { src:"http://i.imgur.com/3v9H4jN.gif", width:70, height:70, title:'sickbeat'},
  30. { src:"http://i.imgur.com/ZAcJ8AM.gif", width:60, height:80, title:'heart'},
  31. { src:"http://i.imgur.com/uYPQZfJ.gif", width:65, height:70, title:'fingerwag'},
  32. { src:"http://i.imgur.com/08o1MVJ.gif", width:60, height:70, title:'buzzkill'},
  33. { src:"http://i.imgur.com/eKELHpX.gif", width:60, height:70, title:'laugh'},
  34. { src:"http://i.imgur.com/1UIV3t1.gif", width:60, height:60, title:'midge'},
  35. { src:"http://i.imgur.com/Z7DcSVF.gif", width:60, height:70, title:'fish'},
  36. { src:"http://i.imgur.com/DjoziBB.gif", width:60, height:60, title:'alrighty'},
  37. { src:"http://i.imgur.com/nWA3DIz.gif", width:65, height:60, title:'ooh'},
  38. { src:"http://i.imgur.com/JKlbFoY.gif", width:65, height:60, title:'turnup'},
  39. { src:"http://i.imgur.com/OaZYsEx.gif", width:60, height:60, title:'runbow'},
  40. { src:"http://i.imgur.com/FIy3qY5.gif", width:60, height:60, title:'shake2'},
  41. { src:"http://i.imgur.com/2gdC6CL.gif", width:65, height:65, title:'charlie'},
  42. { src:"http://i.imgur.com/Cp8852C.png", width:70, height:75, title:'mademefeel'},
  43. { src:"http://i.imgur.com/68753q8.jpg", width:65, height:70, title:'body'},
  44. ];
  45.  
  46. function addEmotes(){
  47. emotes.forEach(function(emote){
  48. window.$codes[emote.title || emote.name] = $('<img>', emote)[0].outerHTML;
  49. });
  50. }
  51. function main(){
  52. if(!window.$codes || Object.keys(window.$codes).length === 0){
  53. setTimeout(main, 75);
  54. }else{
  55. addEmotes();
  56. }
  57. }
  58. if (window.document.readyState === 'complete') {
  59. main();
  60. } else {
  61. window.addEventListener('load', main, false);
  62. }