From 6e621098e32fef79b2c5b732d979c96a229c4c65 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Fri, 11 Dec 2015 08:43:36 +0200 Subject: [PATCH] Autocap use emotesTwitch, pluginmodule init --- js/main.js | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/js/main.js b/js/main.js index 9442bd71..1c021eaa 100644 --- a/js/main.js +++ b/js/main.js @@ -7,7 +7,7 @@ */ -var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers, voiceMode; +var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers, voiceMode, pluginModule; var jsVersion = 1.52; var supportedVersion = "0.1.5"; @@ -160,7 +160,10 @@ Core.prototype.init = function() { } $("head").append(''); //By http://www.somethinghitme.com - + + + pluginModule = new PluginModule(); + pluginModule.loadPlugins(); } else { setTimeout(gwDefer, 100); } @@ -319,9 +322,6 @@ var emotesBTTV = {}; var emotesTwitch = { "emotes": { "emote": { "image_id": 0 } } }; //for ide var subEmotesTwitch = {}; -//TODO Use emotesTwitch for autocap -var twitchAc = {"4head":"4Head","anele":"ANELE","argieb8":"ArgieB8","arsonnosexy":"ArsonNoSexy","asianglow":"AsianGlow","atgl":"AtGL","athenapms":"AthenaPMS","ativy":"AtIvy","atww":"AtWW","babyrage":"BabyRage","batchest":"BatChest","bcwarrior":"BCWarrior","biblethump":"BibleThump","bigbrother":"BigBrother","bionicbunion":"BionicBunion","blargnaut":"BlargNaut","bloodtrail":"BloodTrail","bort":"BORT","brainslug":"BrainSlug","brokeback":"BrokeBack","buddhabar":"BuddhaBar","coolcat":"CoolCat","corgiderp":"CorgiDerp","cougarhunt":"CougarHunt","daesuppy":"DAESuppy","dansgame":"DansGame","dathass":"DatHass","datsheffy":"DatSheffy","dbstyle":"DBstyle","deexcite":"deExcite","deilluminati":"deIlluminati","dendiface":"DendiFace","dogface":"DogFace","doomguy":"DOOMGuy","eagleeye":"EagleEye","elegiggle":"EleGiggle","evilfetus":"EvilFetus","failfish":"FailFish","fpsmarksman":"FPSMarksman","frankerz":"FrankerZ","freakinstinkin":"FreakinStinkin","fungineer":"FUNgineer","funrun":"FunRun","fuzzyotteroo":"FuzzyOtterOO","gasjoker":"GasJoker","gingerpower":"GingerPower","grammarking":"GrammarKing","hassanchop":"HassanChop","heyguys":"HeyGuys","hotpokket":"HotPokket","humblelife":"HumbleLife","itsboshytime":"ItsBoshyTime","jebaited":"Jebaited","jkanstyle":"JKanStyle","joncarnage":"JonCarnage","kapow":"KAPOW","kappa":"Kappa","kappapride":"KappaPride","keepo":"Keepo","kevinturtle":"KevinTurtle","kippa":"Kippa","kreygasm":"Kreygasm","kzskull":"KZskull","mau5":"Mau5","mcat":"mcaT","mechasupes":"MechaSupes","mrdestructoid":"MrDestructoid","mvgame":"MVGame","nightbat":"NightBat","ninjatroll":"NinjaTroll","nonospot":"NoNoSpot","notatk":"NotATK","notlikethis":"NotLikeThis","omgscoots":"OMGScoots","onehand":"OneHand","opieop":"OpieOP","optimizeprime":"OptimizePrime","osbeaver":"OSbeaver","osbury":"OSbury","osdeo":"OSdeo","osfrog":"OSfrog","oskomodo":"OSkomodo","osrob":"OSrob","ossloth":"OSsloth","panicbasket":"panicBasket","panicvis":"PanicVis","pazpazowitz":"PazPazowitz","peopleschamp":"PeoplesChamp","permasmug":"PermaSmug","picomause":"PicoMause","pipehype":"PipeHype","pjharley":"PJHarley","pjsalt":"PJSalt","pmstwin":"PMSTwin","pogchamp":"PogChamp","poooound":"Poooound","praiseit":"PraiseIt","prchase":"PRChase","punchtrees":"PunchTrees","puppeyface":"PuppeyFace","raccattack":"RaccAttack","ralpherz":"RalpherZ","redcoat":"RedCoat","residentsleeper":"ResidentSleeper","ritzmitz":"RitzMitz","rulefive":"RuleFive","shadylulu":"ShadyLulu","shazam":"Shazam","shazamicon":"shazamicon","shazbotstix":"ShazBotstix","shibez":"ShibeZ","smorc":"SMOrc","smskull":"SMSkull","sobayed":"SoBayed","soonerlater":"SoonerLater","srihead":"SriHead","ssssss":"SSSsss","stonelightning":"StoneLightning","strawbeary":"StrawBeary","supervinlin":"SuperVinlin","swiftrage":"SwiftRage","tbbaconbiscuit":"tbBaconBiscuit","tbchickenbiscuit":"tbChickenBiscuit","tbquesarito":"tbQuesarito","tbsausagebiscuit":"tbSausageBiscuit","tbspicy":"tbSpicy","tbsriracha":"tbSriracha","tf2john":"TF2John","theking":"TheKing","theringer":"TheRinger","thetarfu":"TheTarFu","thething":"TheThing","thunbeast":"ThunBeast","tinyface":"TinyFace","toospicy":"TooSpicy","trihard":"TriHard","ttours":"TTours","uleetbackup":"UleetBackup","unclenox":"UncleNox","unsane":"UnSane","vaultboy":"VaultBoy","volcania":"Volcania","wholewheat":"WholeWheat","winwaker":"WinWaker","wtruck":"WTRuck","wutface":"WutFace","youwhy":"YouWHY"}; - function EmoteModule() { } @@ -483,10 +483,12 @@ EmoteModule.prototype.autoCapitalize = function() { }; EmoteModule.prototype.capitalize = function(value) { - if(twitchAc.hasOwnProperty(value)) { - return twitchAc[value]; + var res = emotesTwitch.emotes; + for(var p in res){ + if(res.hasOwnProperty(p) && value == (p+ '').toLowerCase()){ + return p; + } } - return null; }; /* BetterDiscordApp PublicSevers JavaScripts @@ -1156,4 +1158,20 @@ VoiceMode.prototype.disable = function() { $(".chat.flex-vertical.flex-spacer").first().css("visibility", "").css("min-width", ""); $(".flex-vertical.channels-wrap").first().css("flex-grow", ""); $(".guild-header .btn.btn-hamburger").first().css("visibility", ""); +}; + +function PluginModule() { + +} + +PluginModule.prototype.loadPlugins = function() { + +}; + +PluginModule.prototype.startPlugin = function(plugin) { + +}; + +PluginModule.prototype.stopPlugin = function(plugin) { + }; \ No newline at end of file