ModuleBuilder/dist/modules/twitch_emotes.js
2021-01-23 14:19:51 +00:00

3 lines
No EOL
18 KiB
JavaScript

parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"index.js":[function(require,module,exports) {
"use strict";function e(e,t){return n(e)||d(e,t)||i(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,a){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var d=[],n=!0,t=!1,r=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(d.push(c.value),!a||d.length!==a);n=!0);}catch(o){t=!0,r=o}finally{try{n||null==i.return||i.return()}finally{if(t)throw r}}return d}}function n(e){if(Array.isArray(e))return e}function t(e,a){var d;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(d=i(e))||a&&e&&"number"==typeof e.length){d&&(e=d);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,o=!1;return{s:function(){d=e[Symbol.iterator]()},n:function(){var e=d.next();return c=e.done,e},e:function(e){o=!0,r=e},f:function(){try{c||null==d.return||d.return()}finally{if(o)throw r}}}}function r(e){return b(e)||o(e)||i(e)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,a){if(e){if("string"==typeof e)return u(e,a);var d=Object.prototype.toString.call(e).slice(8,-1);return"Object"===d&&e.constructor&&(d=e.constructor.name),"Map"===d||"Set"===d?Array.from(e):"Arguments"===d||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?u(e,a):void 0}}function o(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function b(e){if(Array.isArray(e))return u(e)}function u(e,a){(null==a||a>e.length)&&(a=e.length);for(var d=0,n=new Array(a);d<a;d++)n[d]=e[d];return n}function s(e,a,d,n,t,r,c){try{var i=e[r](c),o=i.value}catch(b){return void d(b)}i.done?a(o):Promise.resolve(o).then(n,t)}function p(e){return function(){var a=this,d=arguments;return new Promise(function(n,t){var r=e.apply(a,d);function c(e){s(r,n,t,c,i,"next",e)}function i(e){s(r,n,t,c,i,"throw",e)}c(void 0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var g,f,m="2.2.3",l=JSON.parse('{"4Head":"354","ANELE":"3792","ArgieB8":"51838","ArsonNoSexy":"50","AsianGlow":"74","AthenaPMS":"32035","BabyRage":"22639","BatChest":"1905","BCouch":"83536","BCWarrior":"30","BibleThump":"86","BigBrother":"1904","BionicBunion":"24","BlargNaut":"38","bleedPurple":"62835","BloodTrail":"69","BORT":"243","BrainSlug":"881","BrokeBack":"4057","BuddhaBar":"27602","ChefFrank":"90129","cmonBruh":"84608","CoolCat":"58127","CorgiDerp":"49106","CougarHunt":"21","DAESuppy":"973","DansGame":"33","DatSheffy":"170","DBstyle":"73","deExcite":"46249","deIlluminati":"46248","DendiFace":"58135","DogFace":"1903","DOOMGuy":"54089","duDudu":"62834","EagleEye":"20","EleGiggle":"4339","FailFish":"360","FPSMarksman":"42","FrankerZ":"65","FreakinStinkin":"39","FUNgineer":"244","FunRun":"48","FuzzyOtterOO":"168","GingerPower":"32","GrammarKing":"3632","HassaanChop":"20225","HassanChop":"68","HeyGuys":"30259","HotPokket":"357","HumbleLife":"46881","ItsBoshyTime":"169","Jebaited":"90","JKanStyle":"15","JonCarnage":"26","KAPOW":"9803","Kappa":"25","KappaClaus":"74510","KappaPride":"55338","KappaRoss":"70433","KappaWealth":"81997","Keepo":"1902","KevinTurtle":"40","Kippa":"1901","Kreygasm":"41","Mau5":"30134","mcaT":"35063","MikeHogu":"81636","MingLee":"68856","MrDestructoid":"28","MVGame":"29","NinjaTroll":"45","NomNom":"90075","NoNoSpot":"44","NotATK":"34875","NotLikeThis":"58765","OhMyDog":"81103","OMGScoots":"91","OneHand":"66","OpieOP":"356","OptimizePrime":"16","OSfrog":"81248","OSkomodo":"81273","OSsloth":"81249","panicBasket":"22998","PanicVis":"3668","PartyTime":"76171","PazPazowitz":"19","PeoplesChamp":"3412","PermaSmug":"27509","PeteZaroll":"81243","PeteZarollTie":"81244","PicoMause":"27","PipeHype":"4240","PJSalt":"36","PMSTwin":"92","PogChamp":"88","Poooound":"358","PraiseIt":"38586","PRChase":"28328","PunchTrees":"47","PuppeyFace":"58136","RaccAttack":"27679","RalpherZ":"1900","RedCoat":"22","ResidentSleeper":"245","riPepperonis":"62833","RitzMitz":"4338","RuleFive":"361","SeemsGood":"64138","ShadyLulu":"52492","ShazBotstix":"87","ShibeZ":"27903","SmoocherZ":"89945","SMOrc":"52","SMSkull":"51","SoBayed":"1906","SoonerLater":"355","SriHead":"14706","SSSsss":"46","StinkyCheese":"90076","StoneLightning":"17","StrawBeary":"37","SuperVinlin":"31","SwiftRage":"34","TF2John":"1899","TheRinger":"18","TheTarFu":"70","TheThing":"7427","ThunBeast":"1898","TinyFace":"67","TooSpicy":"359","TriHard":"171","TTours":"38436","twitchRaid":"62836","UleetBackup":"49","UncleNox":"3666","UnSane":"71","VaultBoy":"54090","VoHiYo":"81274","Volcania":"166","WholeWheat":"1896","WinWaker":"167","WTRuck":"1897","WutFace":"28087","YouWHY":"4337"}'),y=!0,T=!0,h=[],I=function(e){return new Promise(function(a){return setTimeout(a,e)})},S=function(){var e=p(regeneratorRuntime.mark(function e(a,d,n,t){var r,c,i,o,b;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.textContent.match(new RegExp("([\\s]|^)".concat(n,"([\\s]|$)")))){e.next=3;break}return e.abrupt("return");case 3:c=a.textContent.substring(0,r.index+r[1].length),i=a.textContent.substring(r.index+r[0].length-r[2].length),a.textContent=c,(o=document.createElement("span")).classList.add("emojiContainer-3X8SvE"),o.setAttribute("role","button"),o.setAttribute("tabindex","0"),(b=document.createElement("img")).src=t,b.classList.add("emoji","jumboable"),b.draggable=!1,b.setAttribute("aria-label",n),o.appendChild(b),d.insertBefore(o,a.nextSibling),d.insertBefore(document.createTextNode(i),o.nextSibling);case 18:case"end":return e.stop()}},e)}));return function(a,d,n,t){return e.apply(this,arguments)}}(),v={gooseModHandlers:{onImport:function(){var e=p(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:h=JSON.parse('[{"id":"54fa928f01e468494b85b54f","code":"PedoBear","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa92ee01e468494b85b553","code":"RebeccaBlack","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa8f1401e468494b85b537","code":":tf:","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa8fce01e468494b85b53c","code":"CiGrip","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa903b01e468494b85b53f","code":"DatSauce","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa909b01e468494b85b542","code":"ForeverAlone","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa90ba01e468494b85b543","code":"GabeN","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa90f201e468494b85b545","code":"HailHelix","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa913701e468494b85b546","code":"HerbPerve","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa919901e468494b85b548","code":"iDog","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa930801e468494b85b554","code":"rStrike","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa932201e468494b85b555","code":"ShoopDaWhoop","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa9cc901e468494b85b565","code":"SwedSwag","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fab45f633595ca4c713abc","code":"M&Mjc","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fab7d2633595ca4c713abf","code":"bttvNice","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa934001e468494b85b556","code":"TopHam","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa935601e468494b85b557","code":"TwaT","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fa99b601e468494b85b55d","code":"WatChuSay","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fb603201abde735115ddb5","code":"SavageJerky","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"5622aaef3286c42e57d8e4ab","code":"Zappa","imageType":"png","userId":"54f93e618edd5fcd455f213f"},{"id":"566ca11a65dbbdab32ec0558","code":"tehPoleCat","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca1a365dbbdab32ec055b","code":"AngelThump","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbef6601abde735115de57","code":"HHydro","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbefeb01abde735115de5b","code":"TaxiBro","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbf00a01abde735115de5c","code":"BroBalt","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbf02f01abde735115de5d","code":"ButterSauce","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbf05a01abde735115de5e","code":"BaconEffect","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbf07e01abde735115de5f","code":"SuchFraud","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbf09c01abde735115de61","code":"CandianRage","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"54fbefc901abde735115de5a","code":"She\'llBeRight","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"55028cd2135896936880fdd7","code":"D:","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"550352766f86a5b26c281ba2","code":"VisLaud","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"550b344bff8ecee922d2a3c1","code":"KaRappa","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"55189a5062e6bd0027aee082","code":"YetiZ","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"552d2fc2236a1aa17a996c5b","code":"miniJulia","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca00f65dbbdab32ec0544","code":"FishMoley","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca02865dbbdab32ec0547","code":"Hhhehehe","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca04265dbbdab32ec054a","code":"KKona","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca09365dbbdab32ec0555","code":"PoleDoge","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"553b48a21f145f087fc15ca6","code":"sosGame","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"55471c2789d53f2d12781713","code":"CruW","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"555015b77676617e17dd2e8e","code":"RarePepe","imageType":"png","userId":"54f93e618edd5fcd455f213f"},{"id":"54fbef8701abde735115de58","code":"iamsocal","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"555981336ba1901877765555","code":"haHAA","imageType":"png","userId":"54f93e3e8edd5fcd455f213d"},{"id":"55b6524154eefd53777b2580","code":"FeelsBirthdayMan","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"55f324c47f08be9f0a63cce0","code":"RonSmug","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"560577560874de34757d2dc0","code":"KappaCool","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566c9fc265dbbdab32ec053b","code":"FeelsBadMan","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566c9eeb65dbbdab32ec052b","code":"BasedGod","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566c9f3b65dbbdab32ec052e","code":"bUrself","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566c9f6365dbbdab32ec0532","code":"ConcernDoge","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566c9fde65dbbdab32ec053e","code":"FeelsGoodMan","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566c9ff365dbbdab32ec0541","code":"FireSpeed","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca06065dbbdab32ec054e","code":"NaM","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"566ca38765dbbdab32ec0560","code":"SourPls","imageType":"gif","userId":"5561169bd6b9d206222a8c19"},{"id":"567b00c61ddbe1786688a633","code":"LuL","imageType":"png","userId":"54f93e618edd5fcd455f213f"},{"id":"56901914991f200c34ffa656","code":"SaltyCorn","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"56d937f7216793c63ec140cb","code":"FCreep","imageType":"png","userId":"5957e86c36b6a43b492d3989"},{"id":"56e9f494fff3cc5c35e5287e","code":"monkaS","imageType":"png","userId":"55bfba180baa41467919aabf"},{"id":"56f5be00d48006ba34f530a4","code":"VapeNation","imageType":"png","userId":"55583bc00c72ab1d77d8b9b7"},{"id":"56fa09f18eff3b595e93ac26","code":"ariW","imageType":"png","userId":"54ee2465b822020506c52a52"},{"id":"5709ab688eff3b595e93c595","code":"notsquishY","imageType":"png","userId":"54ee2465b822020506c52a52"},{"id":"5733ff12e72c3c0814233e20","code":"FeelsAmazingMan","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"573d38b50ffbf6cc5cc38dc9","code":"DuckerZ","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"59cf182fcbe2693d59d7bf46","code":"SqShy","imageType":"png","userId":"54ee2465b822020506c52a52"},{"id":"58d2e73058d8950a875ad027","code":"Wowee","imageType":"png","userId":"5561169bd6b9d206222a8c19"},{"id":"5dc36a8db537d747e37ac187","code":"WubTF","imageType":"png","userId":"54f93e3e8edd5fcd455f213d"},{"id":"5e76d2ab8c0f5c3723a9a87d","code":"cvR","imageType":"png","userId":"54ee2465b822020506c52a52"},{"id":"5e76d2d2d112fc372574d222","code":"cvL","imageType":"png","userId":"54ee2465b822020506c52a52"},{"id":"5e76d338d6581c3724c0f0b2","code":"cvHazmat","imageType":"png","userId":"54ee2465b822020506c52a52"},{"id":"5e76d399d6581c3724c0f0b8","code":"cvMask","imageType":"png","userId":"54ee2465b822020506c52a52"}]');case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),onLoadingFinished:function(){var e=p(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:g=setInterval(p(regeneratorRuntime.mark(function e(){var a,d,n,c,i,o,b,u,s,p,g,f,m,I;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=r(document.getElementsByClassName("messageContent-2qWWxC")),d=t(a),e.prev=2,d.s();case 4:if((n=d.n()).done){e.next=70;break}if(c=n.value,!y){e.next=32;break}e.t0=regeneratorRuntime.keys(l);case 8:if((e.t1=e.t0()).done){e.next=32;break}if(i=e.t1.value,c.textContent.includes(i)){e.next=12;break}return e.abrupt("continue",8);case 12:o=t(c.childNodes),e.prev=13,o.s();case 15:if((b=o.n()).done){e.next=22;break}if((u=b.value).textContent.includes(i)){e.next=19;break}return e.abrupt("continue",20);case 19:S(u,c,i,"https://static-cdn.jtvnw.net/emoticons/v1/".concat(l[i],"/1.0"));case 20:e.next=15;break;case 22:e.next=27;break;case 24:e.prev=24,e.t2=e.catch(13),o.e(e.t2);case 27:return e.prev=27,o.f(),e.finish(27);case 30:e.next=8;break;case 32:if(!T){e.next=68;break}s=t(h),e.prev=34,s.s();case 36:if((p=s.n()).done){e.next=60;break}if(g=p.value,c.textContent.includes(g.code)){e.next=40;break}return e.abrupt("continue",58);case 40:f=t(c.childNodes),e.prev=41,f.s();case 43:if((m=f.n()).done){e.next=50;break}if((I=m.value).textContent.includes(g.code)){e.next=47;break}return e.abrupt("continue",48);case 47:S(I,c,g.code,"https://cdn.betterttv.net/emote/".concat(g.id,"/2x.").concat(g.imageType));case 48:e.next=43;break;case 50:e.next=55;break;case 52:e.prev=52,e.t3=e.catch(41),f.e(e.t3);case 55:return e.prev=55,f.f(),e.finish(55);case 58:e.next=36;break;case 60:e.next=65;break;case 62:e.prev=62,e.t4=e.catch(34),s.e(e.t4);case 65:return e.prev=65,s.f(),e.finish(65);case 68:e.next=4;break;case 70:e.next=75;break;case 72:e.prev=72,e.t5=e.catch(2),d.e(e.t5);case 75:return e.prev=75,d.f(),e.finish(75);case 78:case"end":return e.stop()}},e,null,[[2,72,75,78],[13,24,27,30],[34,62,65,68],[41,52,55,58]])})),500),goosemodScope.settings.createItem("Twitch Emotes",["(v".concat(m,")"),{type:"header",text:"Emote Sources"},{type:"toggle",text:"Global Twitch Emotes",subtext:"Regular global Twitch emotes",onToggle:function(e){y=e},isToggled:function(){return y}},{type:"toggle",text:"BetterTTV Global Emotes",subtext:"BetterTTV Global Emotes",onToggle:function(e){T=e},isToggled:function(){return T}}]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),onRemove:function(){var e=p(regeneratorRuntime.mark(function e(){var a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:clearInterval(g),a=goosemodScope.settings.items.find(function(e){return"Twitch Emotes"===e[1]}),goosemodScope.settings.items.splice(goosemodScope.settings.items.indexOf(a),1);case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),getSettings:function(){return[y,T]},loadSettings:function(a){var d=e(a,2),n=d[0],t=d[1];y=n,T=t},logRegionColor:"green"}};exports.default=v;
},{}]},{},["index.js"], null);parcelRequire('index.js').default