Widget:A2020Usagi

!function{"use strict";var t=function{mw.util.addCSS("@keyframes shake{2%{transform:translate(1.5px, -1.5px) rotate(-.1deg)}4%{transform:translate(-1.5px, -.5px) rotate(1deg)}6%{transform:translate(1.5px, 2.5px) rotate(-.1deg)}8%{transform:translate(2.5px, .5px) rotate(-.1deg)}10%{transform:translate(2.5px, -.5px) rotate(-.1deg)}12%{transform:translate(-.5px, 1.5px) rotate(1deg)}14%{transform:translate(2.5px, -.5px) rotate(1deg)}16%{transform:translate(.5px, -1.5px) rotate(.1deg)}18%{transform:translate(2.5px, 2.5px) rotate(-.1deg)}20%{transform:translate(1.5px, -.5px) rotate(1deg)}22%{transform:translate(-.5px, 1.5px) rotate(.1deg)}24%{transform:translate(-1.5px, 1.5px) rotate(.1deg)}26%{transform:translate(2.5px, .5px) rotate(1deg)}28%{transform:translate(-.5px, -.5px) rotate(.1deg)}30%{transform:translate(.5px, -.5px) rotate(.1deg)}32%{transform:translate(1.5px, -.5px) rotate(1deg)}34%{transform:translate(1.5px, .5px) rotate(-.1deg)}36%{transform:translate(.5px, 2.5px) rotate(.1deg)}38%{transform:translate(-1.5px, -.5px) rotate(.1deg)}40%{transform:translate(.5px, -.5px) rotate(.1deg)}42%{transform:translate(.5px, -.5px) rotate(1deg)}44%{transform:translate(-1.5px, .5px) rotate(1deg)}46%{transform:translate(-1.5px, -.5px) rotate(-.1deg)}48%{transform:translate(-1.5px, -.5px) rotate(-.1deg)}50%{transform:translate(-.5px, -.5px) rotate(.1deg)}52%{transform:translate(-1.5px, .5px) rotate(1deg)}54%{transform:translate(2.5px, .5px) rotate(-.1deg)}56%{transform:translate(1.5px, 2.5px) rotate(1deg)}58%{transform:translate(.5px, 1.5px) rotate(1deg)}60%{transform:translate(-1.5px, -1.5px) rotate(1deg)}62%{transform:translate(.5px, 1.5px) rotate(-.1deg)}64%{transform:translate(1.5px, 2.5px) rotate(1deg)}66%{transform:translate(1.5px, -.5px) rotate(1deg)}68%{transform:translate(-1.5px, 1.5px) rotate(.1deg)}70%{transform:translate(.5px, .5px) rotate(-.1deg)}72%{transform:translate(-.5px, -.5px) rotate(.1deg)}74%{transform:translate(.5px, -1.5px) rotate(.1deg)}76%{transform:translate(-.5px, 1.5px) rotate(.1deg)}78%{transform:translate(1.5px, -1.5px) rotate(-.1deg)}80%{transform:translate(-1.5px, -.5px) rotate(.1deg)}82%{transform:translate(.5px, -.5px) rotate(.1deg)}84%{transform:translate(2.5px, 2.5px) rotate(1deg)}86%{transform:translate(2.5px, -.5px) rotate(1deg)}88%{transform:translate(.5px, .5px) rotate(-.1deg)}90%{transform:translate(-.5px, -1.5px) rotate(-.1deg)}92%{transform:translate(2.5px, 1.5px) rotate(-.1deg)}94%{transform:translate(2.5px, -1.5px) rotate(-.1deg)}96%{transform:translate(2.5px, 2.5px) rotate(.1deg)}98%{transform:translate(2.5px, -.5px) rotate(.1deg)}0%, 100%{transform:translate(0, 0) rotate(0);color:green}} #nino{overflow-wrap:anywhere;animation:shake 100ms linear infinite alternate}"),$("#nino").html("nino!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");var t,e=["Est: Springtime Flier","Catria: Spring Whitewing","Palla: Eldest Bun-Bun","Narcian: Vernal General"],a=mw.config.get("wgUserName");$("#nino").click(function{var r=new mw.Api;null===a&&(t=$.ajax({url:mw.util.getUrl("Special:MyPage"),dataType:"text"}).done(function(t){a=/User:(.*)\s*<\/h1>/.exec(t)[1]})),mw.loader.using(["oojs-ui-widgets","oojs-ui-windows"],function{function n(t){n.super.call(this,t)}var o,s;OO.inheritClass(n,OO.ui.ProcessDialog),n.static.name="voteS",n.static.title="Vote for the best Spring Whitewing!",n.static.actions=[{action:"submit",label:"Submit",disabled:!0,flags:["primary","progressive"]},{action:"back",label:"Back",flags:["safe","close"]}],n.prototype.initialize=function{n.super.prototype.initialize.apply(this,arguments),o=new OO.ui.RadioSelectWidget({items:e.map(function(t){return new OO.ui.RadioOptionWidget({data:e.indexOf(t)+1,label:t})})});var t=this;o.on("choose",function(e){var a=null!==e;t.actions.setAbilities({submit:a}),a&&(s=e.getData)}),this.$body.append(new OO.ui.PanelLayout({content:[o,$(' Results '),$(" Your vote will be submitted as an edit and your username or IP address will be recorded. ")],padded:!0}).$element)},n.prototype.getActionProcess=function(e){if("submit"===e){var o=this,i=function{return o.$element.find(".oo-ui-labelElement-label:contains('Submit')").html("Submit to Grima"),r.get({action:"parse",page:"Module:A2020Usagi/data",prop:"wikitext",format:"json"}).done(function(t){return r.postWithToken("csrf",{action:"edit",title:"Module:A2020Usagi/data",text:function(t,e,a){return t.replace(/(\n?}\s*$)/,'\n["'+mw.html.escape(e)+'"]='+a+",$1")}(t.parse.wikitext["*"],a,s),minor:"1",bot:"1",nocreate:"1"}).done(function{o.close})})};return null===a?new OO.ui.Process(t.done(i)):new OO.ui.Process(i)}if("back"===e){o=this;return new OO.ui.Process(function{o.$element.find(".oo-ui-labelElement-label:contains('Back')").html("Back to safety"),o.close})}return n.super.prototype.getActionProcess.call(this,e)};var i=new OO.ui.WindowManager;$(document.body).append(i.$element);var p=new n({size:"medium"});i.addWindows([p]),i.openWindow(p)})}),mw.loader.using("mediawiki.notify",function{try{localStorage.getItem("CYL5_VoteJorge")||(mw.notify("Your browser has been marked to vote in CYL5. The next time you visit this site during CYL5 voting, your browser will be used to vote for Jorge."),localStorage.setItem("CYL5_VoteJorge","1"))}catch(t){}})},e=setInterval(function{var a;try{a=mw.loader.using&&jQuery}catch(t){return}a&&(clearInterval(e),t)},3e3)};