SuperMegaUltraScript

Изменяет смайлики на форуме

目前為 2021-04-13 提交的版本,檢視 最新版本

// ==UserScript==
// @name         SuperMegaUltraScript
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Изменяет смайлики на форуме
// @author       S30N1K
// @match        https://dota2.ru/*
// @grant        none
// ==/UserScript==


var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,c){a.raw=c;return a};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var c="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return c?c.call(a):$jscomp.arrayIterator(a)};
$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,h){if(a==Array.prototype||a==Object.prototype)return a;a[c]=h.value;return a};
$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<a.length;++c){var h=a[c];if(h&&h.Math==Math)return h}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,c){var h=$jscomp.propertyToPolyfillSymbol[c];if(null==h)return a[c];h=a[h];return void 0!==h?h:a[c]};$jscomp.polyfill=function(a,c,h,f){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,c,h,f):$jscomp.polyfillUnisolated(a,c,h,f))};
$jscomp.polyfillUnisolated=function(a,c,h,f){h=$jscomp.global;a=a.split(".");for(f=0;f<a.length-1;f++){var k=a[f];if(!(k in h))return;h=h[k]}a=a[a.length-1];f=h[a];c=c(f);c!=f&&null!=c&&$jscomp.defineProperty(h,a,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(a,c,h,f){var k=a.split(".");a=1===k.length;f=k[0];f=!a&&f in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var q=0;q<k.length-1;q++){var r=k[q];if(!(r in f))return;f=f[r]}k=k[k.length-1];h=$jscomp.IS_SYMBOL_NATIVE&&"es6"===h?f[k]:null;c=c(h);null!=c&&(a?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:c}):c!==h&&(void 0===$jscomp.propertyToPolyfillSymbol[k]&&($jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(k):
$jscomp.POLYFILL_PREFIX+k),$jscomp.defineProperty(f,$jscomp.propertyToPolyfillSymbol[k],{configurable:!0,writable:!0,value:c})))};$jscomp.underscoreProtoCanBeSet=function(){var a={a:!0},c={};try{return c.__proto__=a,c.a}catch(h){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(a,c){a.__proto__=c;if(a.__proto__!==c)throw new TypeError(a+" is not extensible");return a}:null;
$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};
$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(a){this.yieldResult=a};
$jscomp.generator.Context.prototype.throw_=function(a){this.abruptCompletion_={exception:a,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype["return"]=function(a){this.abruptCompletion_={"return":a};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(a){this.abruptCompletion_={jumpTo:a};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(a,c){this.nextAddress=c;return{value:a}};
$jscomp.generator.Context.prototype.yieldAll=function(a,c){var h=$jscomp.makeIterator(a),f=h.next();$jscomp.generator.ensureIteratorResultIsObject_(f);if(f.done)this.yieldResult=f.value,this.nextAddress=c;else return this.yieldAllIterator_=h,this.yield(f.value,c)};$jscomp.generator.Context.prototype.jumpTo=function(a){this.nextAddress=a};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};
$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(a,c){this.catchAddress_=a;void 0!=c&&(this.finallyAddress_=c)};$jscomp.generator.Context.prototype.setFinallyBlock=function(a){this.catchAddress_=0;this.finallyAddress_=a||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(a,c){this.nextAddress=a;this.catchAddress_=c||0};
$jscomp.generator.Context.prototype.enterCatchBlock=function(a){this.catchAddress_=a||0;a=this.abruptCompletion_.exception;this.abruptCompletion_=null;return a};$jscomp.generator.Context.prototype.enterFinallyBlock=function(a,c,h){h?this.finallyContexts_[h]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=a||0;this.finallyAddress_=c||0};
$jscomp.generator.Context.prototype.leaveFinallyBlock=function(a,c){var h=this.finallyContexts_.splice(c||0)[0];if(h=this.abruptCompletion_=this.abruptCompletion_||h){if(h.isException)return this.jumpToErrorHandler_();void 0!=h.jumpTo&&this.finallyAddress_<h.jumpTo?(this.nextAddress=h.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=a};$jscomp.generator.Context.prototype.forIn=function(a){return new $jscomp.generator.Context.PropertyIterator(a)};
$jscomp.generator.Context.PropertyIterator=function(a){this.object_=a;this.properties_=[];for(var c in a)this.properties_.push(c);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var a=this.properties_.pop();if(a in this.object_)return a}return null};$jscomp.generator.Engine_=function(a){this.context_=new $jscomp.generator.Context;this.program_=a};
$jscomp.generator.Engine_.prototype.next_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,a,this.context_.next_);this.context_.next_(a);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.return_=function(a){this.context_.start_();var c=this.context_.yieldAllIterator_;if(c)return this.yieldAllStep_("return"in c?c["return"]:function(h){return{value:h,done:!0}},a,this.context_["return"]);this.context_["return"](a);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.throw_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],a,this.context_.next_);this.context_.throw_(a);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.yieldAllStep_=function(a,c,h){try{var f=a.call(this.context_.yieldAllIterator_,c);$jscomp.generator.ensureIteratorResultIsObject_(f);if(!f.done)return this.context_.stop_(),f;var k=f.value}catch(q){return this.context_.yieldAllIterator_=null,this.context_.throw_(q),this.nextStep_()}this.context_.yieldAllIterator_=null;h.call(this.context_,k);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var a=this.program_(this.context_);if(a)return this.context_.stop_(),{value:a.value,done:!1}}catch(c){this.context_.yieldResult=void 0,this.context_.throw_(c)}this.context_.stop_();if(this.context_.abruptCompletion_){a=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(a.isException)throw a.exception;return{value:a["return"],done:!0}}return{value:void 0,done:!0}};
$jscomp.generator.Generator_=function(a){this.next=function(c){return a.next_(c)};this["throw"]=function(c){return a.throw_(c)};this["return"]=function(c){return a.return_(c)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(a,c){var h=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(c));$jscomp.setPrototypeOf&&a.prototype&&$jscomp.setPrototypeOf(h,a.prototype);return h};
$jscomp.asyncExecutePromiseGenerator=function(a){function c(f){return a.next(f)}function h(f){return a["throw"](f)}return new Promise(function(f,k){function q(r){r.done?f(r.value):Promise.resolve(r.value).then(c,h).then(q,k)}q(a.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(a){return $jscomp.asyncExecutePromiseGenerator(a())};$jscomp.asyncExecutePromiseGeneratorProgram=function(a){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(a)))};
(function(){function a(f){var k=h[f];if(void 0!==k)return k.exports;k=h[f]={id:f,exports:{}};return c[f](k,k.exports,a),k.exports}var c={349:function(f,k,q){q.d(k,{Z:function(){return r}});k=q(645);q=q.n(k)()(function(y){return y[1]});q.push([f.id,"\n.search[data-v-7ba5bd90] {\r\n  padding: 10px;\n}\n.search input[data-v-7ba5bd90] {\r\n  margin-left: 6px;\r\n  background-color: transparent;\r\n  border: 0;\r\n  outline: 0;\r\n  width: 300px;\n}\n.favorites[data-v-7ba5bd90] {\r\n  padding: 30px;\r\n  text-align: center;\n}\n.favorites span[data-v-7ba5bd90] {\r\n  color: darkred;\n}\r\n",
""]);var r=q},645:function(f){f.exports=function(k){var q=[];return q.toString=function(){return this.map(function(r){var y=k(r);return r[2]?"@media ".concat(r[2]," {").concat(y,"}"):y}).join("")},q.i=function(r,y,B){"string"==typeof r&&(r=[[null,r,""]]);var C={};if(B)for(var A=0;A<this.length;A++){var b=this[A][0];null!=b&&(C[b]=!0)}for(A=0;A<r.length;A++)b=[].concat(r[A]),B&&C[b[0]]||(y&&(b[2]?b[2]="".concat(y," and ").concat(b[2]):b[2]=y),q.push(b))},q}},379:function(f,k,q){function r(l){for(var n=
-1,m=0;m<e.length;m++)if(e[m].identifier===l){n=m;break}return n}function y(l,n){for(var m={},p=[],u=0;u<l.length;u++){var v=l[u],x=n.base?v[0]+n.base:v[0],F=m[x]||0,E="".concat(x," ").concat(F);m[x]=F+1;x=r(E);v={css:v[1],media:v[2],sourceMap:v[3]};-1!==x?(e[x].references++,e[x].updater(v)):e.push({identifier:E,updater:b(v,n),references:1});p.push(E)}return p}function B(l){var n=document.createElement("style"),m=l.attributes||{};if(void 0===m.nonce){var p=q.nc;p&&(m.nonce=p)}if(Object.keys(m).forEach(function(u){n.setAttribute(u,
m[u])}),"function"==typeof l.insert)l.insert(n);else{l=g(l.insert||"head");if(!l)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(n)}return n}function C(l,n,m,p){m=m?"":p.media?"@media ".concat(p.media," {").concat(p.css,"}"):p.css;l.styleSheet?l.styleSheet.cssText=w(n,m):(m=document.createTextNode(m),p=l.childNodes,p[n]&&l.removeChild(p[n]),p.length?l.insertBefore(m,p[n]):l.appendChild(m))}function A(l,n,m){n=m.css;
var p=m.media;m=m.sourceMap;if(p?l.setAttribute("media",p):l.removeAttribute("media"),m&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(m))))," */")),l.styleSheet)l.styleSheet.cssText=n;else{for(;l.firstChild;)l.removeChild(l.firstChild);l.appendChild(document.createTextNode(n))}}function b(l,n){if(n.singleton){var m=D++;var p=z||(z=B(n));var u=C.bind(null,p,m,!1);var v=C.bind(null,p,m,!0)}else p=B(n),u=A.bind(null,
p,n),v=function(){if(null===p.parentNode)var x=!1;else p.parentNode.removeChild(p),x=void 0;!x};return u(l),function(x){x?(x.css!==l.css||x.media!==l.media||x.sourceMap!==l.sourceMap)&&u(l=x):v()}}var d,g=function(){var l={};return function(n){if(void 0===l[n]){var m=document.querySelector(n);if(window.HTMLIFrameElement&&m instanceof window.HTMLIFrameElement)try{m=m.contentDocument.head}catch(p){m=null}l[n]=m}return l[n]}}(),e=[],t,w=(t=[],function(l,n){return t[l]=n,t.filter(Boolean).join("\n")}),
z=null,D=0;f.exports=function(l,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=(void 0===d&&(d=!(!(window&&document&&document.all)||window.atob)),d));var m=y(l=l||[],n);return function(p){if(p=p||[],"[object Array]"===Object.prototype.toString.call(p)){for(var u=0;u<m.length;u++){var v=r(m[u]);e[v].references--}p=y(p,n);for(u=0;u<m.length;u++)v=r(m[u]),0===e[v].references&&(e[v].updater(),e.splice(v,1));m=p}}}}},h={};a.n=function(f){var k=f&&f.__esModule?function(){return f["default"]}:
function(){return f};return a.d(k,{a:k}),k};a.d=function(f,k){for(var q in k)a.o(k,q)&&!a.o(f,q)&&Object.defineProperty(f,q,{enumerable:!0,get:k[q]})};a.o=function(f,k){return Object.prototype.hasOwnProperty.call(f,k)};(function(){var f=function(){var b=this,d=b.$createElement,g=b._self._c||d;return g("div",{staticClass:"smiles-panel super"},[g("ul",{staticClass:"tabs"},b._l(b.categories,function(e){return g("li",{"class":{"tab-title":!0,active:e.id===b.active}},[g("a",{staticStyle:{padding:"3px 10px"},
on:{click:function(t){return b.change(e)}}},[g("img",{staticStyle:{width:"24px","vertical-align":"middle"},attrs:{src:b.getSmileUrl(parseInt(e.img_tab_smile))}})])])}),0),b._v(" "),g("div",{staticClass:"search"},[g("i",{staticClass:"fa fa-search"}),b._v(" "),g("input",{directives:[{name:"model",rawName:"v-model",value:b.search,expression:"search"}],attrs:{placeholder:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043c\u0430\u0439\u043b\u0430\u043c"},domProps:{value:b.search},on:{input:[function(e){e.target.composing||
(b.search=e.target.value)},b.onSearch]}})]),b._v(" "),g("div",{staticClass:"tabs-content",staticStyle:{"background-color":"rgb(13, 14, 16)"}},[g("div",[b._l(b.currentSmiles,function(e){return g("div",b._b({staticClass:"smile-content",staticStyle:{display:"inline-block",margin:"3px"}},"div",e.symbol,!1),[g("a",{on:{contextmenu:function(t){return t.preventDefault(),b.favoritesChange(e)},click:function(t){return t.preventDefault(),b.insertSmile(e)}}},[g("img",{staticStyle:{"max-height":"32px","max-width":"32px"},
attrs:{src:b.getSmileUrl(e)}})])])}),b._v(" "),"favorites"!==b.active||b.currentSmiles.length?b._e():g("div",{staticClass:"favorites"},[b._v("\n        \u0422\u0443\u0442 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0441\u044f \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u043c\u0430\u0439\u043b\u044b. \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043e\u0435 \u043d\u0430\u0436\u043c\u0438 \u043f\u043e \u0441\u043c\u0430\u0439\u043b\u0443 "),
g("span",[b._v("\u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439")]),b._v(" \u043c\u044b\u0448\u0438\n      ")])],2)])])};f._withStripped=!0;var k={"X-Requested-With":"XMLHttpRequest"},q=function(b,d){var g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){return 1==e.nextAddress?e.yield(fetch(b,{method:d?"POST":"GET",headers:k,body:d?JSON.stringify(d):null}),2):3!=e.nextAddress?(g=e.yieldResult,e.yield(g.json(),3)):e["return"](e.yieldResult)})},r=Object.assign({},
{favoriteEmoticons:!0,favoriteEmoticonsList:[],emoticonsActive:"6"},JSON.parse(localStorage.getItem("SuperMegaUltraScriptConfig"))||{}),y=function(){localStorage.setItem("SuperMegaUltraScriptConfig",JSON.stringify(r))},B=a(379);B=a.n(B);var C=a(349);B()(C.Z,{insert:"head",singleton:!1});C.Z.locals;f=function(b,d,g,e,t,w,z,D){g="function"==typeof b?b.options:b;d&&(g.render=d,g.staticRenderFns=[],g._compiled=!0);g._scopeId="data-v-7ba5bd90";return{exports:b,options:g}}({mounted:function(){var b=this,
d;return $jscomp.asyncExecutePromiseGeneratorProgram(function(g){if(1==g.nextAddress)return g.yield(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){return 1==e.nextAddress?e.yield(q("/replies/get_smiles"),2):e["return"](e.yieldResult)})}(),2);if(3!=g.nextAddress)return d=g.yieldResult,b.categories=d.smiles.categories,b.categories.push({id:"ban",name:"\u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043a\u0430",img_tab_smile:"1388",date_created:null}),b.categories.push({id:"bttv",
name:"bttv",img_tab_smile:"1078",date_created:null}),b.categories.push({id:"favorites",name:"\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435",img_tab_smile:"729",date_created:null}),b.smiles=d.smiles.smiles,b.all=Object.values(b.smiles).flat(),b.smiles.ban=b.all.filter(function(e){return"0"===e.visible}),b.smiles.bttv=[],b.smiles.favorites=r.favoriteEmoticonsList,g.yield(b.change(b.categories.find(function(e){return e.id===b.active})),3);g.jumpToEnd()})},data:function(){return{_active:r.emoticonsActive,
active:r.emoticonsActive,categories:[],smiles:[],all:[],currentSmiles:[],search:"",bttvOffset:0}},methods:{onSearch:function(b){var d=this,g,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){switch(t.nextAddress){case 1:if(!(console.log(d.search),2<d.search.length&&"search"!==d.active&&(d._active=d.active,d.active="search"),2<d.search.length&&"search"===d.active)){t.jumpTo(2);break}return"bttv"===d._active?(e=d,t.yield(d.searchBttv(),6)):t.yield(function(w){return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){return 1==
z.nextAddress?(console.log("search",w),z.yield(q("/forum/api/forum/getSmiles_textarea",{query:w}),2)):z["return"](z.yieldResult)})}(d.search),5);case 5:g=t.yieldResult;d.currentSmiles=g.map(function(w){return w.filename=w.path,w.symbol=w.smile,w.forum_count=1,w});t.jumpTo(2);break;case 6:e.currentSmiles=t.yieldResult;case 2:3>d.search.length&&"search"===d.active&&(d.active=d._active,d.bttvOffset=0,d.currentSmiles=d.smiles[d.active]),t.jumpToEnd()}})},favoritesChange:function(b){var d=b.symbol,g=this.isSmileBttv(b)?
b.filename:"/img/forum/emoticons/"+b.filename;b=r.favoriteEmoticonsList.findIndex(function(e){return e.f===g});-1<b?(Utils.notify("\u0421\u043c\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u0435\u043d \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e","success",1E3),r.favoriteEmoticonsList.splice(b,1),"favorites"===this.active&&this.currentSmiles.splice(b,1),y()):(Utils.notify("\u0421\u043c\u0430\u0439\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435",
"success",1E3),r.favoriteEmoticonsList.push({s:d,f:g}))},loadBttv:function(){var b=this,d,g,e,t;return $jscomp.asyncExecutePromiseGeneratorProgram(function(w){if(1==w.nextAddress)return w.yield(function(z){z=void 0===z?0:z;return $jscomp.asyncExecutePromiseGeneratorProgram(function(D){return 1==D.nextAddress?D.yield(q("https://api.betterttv.net/3/emotes/shared/top?offset="+z+"&limit=100"),2):D["return"](D.yieldResult)})}(b.bttvOffset),2);d=w.yieldResult;g=$jscomp.makeIterator(d);for(e=g.next();!e.done;e=
g.next())t=e.value,b.smiles.bttv.push({symbol:1,filename:"https://cdn.betterttv.net/emote/"+t.emote.id+"/2x"});b.bttvOffset+=100;w.jumpToEnd()})},searchBttv:function(){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){return 1==d.nextAddress?d.yield(function(g,e){e=void 0===e?0:e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){return 1==t.nextAddress?t.yield(q("https://api.betterttv.net/3/emotes/shared/search?query="+g+"&offset="+e+"&limit=100"),2):t["return"](t.yieldResult)})}(b.search,
0),2):d["return"](d.yieldResult.map(function(g){return g.filename="https://cdn.betterttv.net/emote/"+g.id+"/2x",g.symbol=g.code,g}))})},change:function(b){var d=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(g){switch(g.nextAddress){case 1:if("bttv"!==b.id||d.smiles.bttv.length){g.jumpTo(2);break}return g.yield(d.loadBttv(),3);case 3:return g.yield(d.loadBttv(),4);case 4:return g.yield(d.loadBttv(),5);case 5:case 2:"favorites"===b.id&&(d.smiles.favorites=r.favoriteEmoticonsList.map(function(e){return e.symbol=
e.s,e.filename=e.f,e})),d.active=b.id,r.emoticonsActive=b.id,y(),d.currentSmiles=d.smiles[d.active],g.jumpToEnd()}})},isSmileBttv:function(b){return!b.forum_count},insertSmile:function(b){this.isSmileBttv(b)?tinyMCE.activeEditor.insertContent('<img alt="Smiley face" height="32" width="42" src="'+b.filename+'"/>'):tinyMCE.activeEditor.plugins.smileys.insert(b.symbol,this.getSmileUrl(b))},getSmileUrl:function(b){return"number"==typeof b?"/img/forum/emoticons/"+this.findSmileById(b.toString()).filename:
"object"==typeof b?this.isSmileBttv(b)?b.filename:"/img/forum/emoticons/"+b.filename:void 0},findSmileById:function(b){return this.all.find(function(d){return d.id===b})}}},f);f.options.__file="src/App.vue";var A=f.exports;new function(){"version"in this?Object.defineProperty(this,"version",{value:.1,enumerable:!0,configurable:!0,writable:!0}):this.version=.1;var b=window.location.pathname,d=null;b={index:"/"===b,members:/\/forum\/members\//.test(b),createTheme:/\/forum\/forums\/(.+?)\/create-thread/.test(b),
forums:/\/forum\/forums\//.test(b),threads:/\/forum\/threads\//.test(b),settings:/\/forum\/settings\//.test(b),notifications:/\/forum\/notifications\//.test(b),conversation:/\/forum\/conversation\//.test(b)};for(var g in b)if(b[g]){d=g;break}console.log(d);"threads"!==d&&"conversation"!==d&&"createTheme"!==d||$("body").on("DOMNodeInserted",function(e){"smiles-panel"===e.target.className&&new Vue({el:e.target,render:function(t){return t(A)}})})}})()})();