JudgeZexion's Custom Emotes

Custom Emotes!!!

当前为 2015-07-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name JudgeZexion's Custom Emotes
  3. // @namespace Rooms
  4. // @version 1.46
  5. // @description Custom Emotes!!!
  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:"https://i.ytimg.com/vi/Z6gG3tKDBlk/maxresdefault.jpg", width:100, height:60, title:'doit'},
  20. { src:"https://wwcdn.weddingwire.com/wedding/1120001_1125000/1123438/thumbnails/400x400_1346783188237-partyhard.jpg", width:110, height:110, title:'partyhard'},
  21. { src:"http://i.imgur.com/YqdnTBX.jpg", width:100, height:100, title:'bigblacknigga'},
  22. { src:"http://i.imgur.com/RFlgdxc.gif", width:90, height:120, title:'lipsuckin'},
  23. { src:"https://i.imgur.com/e59lUCu.gif", width:220, height:200, title:'bigblackgif'},
  24. { src:"http://i.imgur.com/c1hMV16.jpg", width:100, height:100, title:'fuckboy'},
  25. { src: "https://steamcommunity.com//economy/emoticon/:dappershark:", width:18, height:18, title:'dappershark'},
  26. { src: "http://images-cdn.moviepilot.com/image/upload/c_fill,h_296,w_480/t_mp_quality/screen-shot-2015-02-18-at-4-37-30-pm-the-russian-sleep-experiment-is-the-freakiest-story-ever-told-but-is-it-true-png-267188.jpg", width:100, height:100, title:'sleep'},
  27.  
  28. ];
  29.  
  30. function addEmotes(){
  31. emotes.forEach(function(emote){
  32. window.$codes[emote.title || emote.name] = $('<img>', emote)[0].outerHTML;
  33. });
  34. }
  35.  
  36. function main(){
  37. if(!window.$codes || Object.keys(window.$codes).length === 0){
  38. setTimeout(main, 75);
  39. }else{
  40. addEmotes();
  41. }
  42. }
  43. if (window.document.readyState === 'complete') {
  44. main();
  45. } else {
  46. window.addEventListener('load', main, false);
  47. }