// ==UserScript==
// @name Skinchanger for Vanis.io
// @namespace Skinchanger for Vanis.io
// @version 1.0
// @description Vanis.io skinchanger by Diszy
// @author Diszy
// @match https://vanis.io/*
// @match https://dev.vanis.io/*
// @run-at document-start
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @require http://code.jquery.com/ui/1.9.2/jquery-ui.js
// @grant none
// ==/UserScript==
// CHANGE YOUR SKIN URLS, MAXIMUM OF 6 SKINS.
var skin1 = "https://skins.vanis.io/s/f7k8v0";
var skin2 = "https://skins.vanis.io/s/f7k8v0";
var skin3 = "https://skins.vanis.io/s/f7k8v0";
var skin4 = "https://skins.vanis.io/s/f7k8v0";
var skin5 = "https://skins.vanis.io/s/f7k8v0";
var skin6 = "https://skins.vanis.io/s/f7k8v0";
var rotateTime = 300000 // 1 second = 1000, 1 minute = 60000
// END OF CHANGE YOUR SKINS URLS
//DON'T TOUCH THIS IF YOU DON'T UNDERSTAND.
function p(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:p(a)}}var t="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,u="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,e){a!=Array.prototype&&a!=Object.prototype&&(a[b]=e.value)};
function v(a,b){if(b){for(var e=t,g=a.split("."),k=0;k<g.length-1;k++){var l=g[k];l in e||(e[l]={});e=e[l]}g=g[g.length-1];k=e[g];l=b(k);l!=k&&null!=l&&u(e,g,{configurable:!0,writable:!0,value:l})}}
v("Promise",function(a){function b(c){this.l=0;this.v=void 0;this.g=[];var d=this.s();try{c(d.resolve,d.reject)}catch(f){d.reject(f)}}function e(){this.b=null}function g(c){return c instanceof b?c:new b(function(d){d(c)})}if(a)return a;e.prototype.w=function(c){if(null==this.b){this.b=[];var d=this;this.A(function(){d.K()})}this.b.push(c)};var k=t.setTimeout;e.prototype.A=function(c){k(c,0)};e.prototype.K=function(){for(;this.b&&this.b.length;){var c=this.b;this.b=[];for(var d=0;d<c.length;++d){var f=
c[d];c[d]=null;try{f()}catch(h){this.H(h)}}}this.b=null};e.prototype.H=function(c){this.A(function(){throw c;})};b.prototype.s=function(){function c(h){return function(m){f||(f=!0,h.call(d,m))}}var d=this,f=!1;return{resolve:c(this.P),reject:c(this.u)}};b.prototype.P=function(c){if(c===this)this.u(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof b)this.R(c);else{a:switch(typeof c){case "object":var d=null!=c;break a;case "function":d=!0;break a;default:d=!1}d?this.O(c):this.C(c)}};
b.prototype.O=function(c){var d=void 0;try{d=c.then}catch(f){this.u(f);return}"function"==typeof d?this.S(d,c):this.C(c)};b.prototype.u=function(c){this.D(2,c)};b.prototype.C=function(c){this.D(1,c)};b.prototype.D=function(c,d){if(0!=this.l)throw Error("Cannot settle("+c+", "+d+"): Promise already settled in state"+this.l);this.l=c;this.v=d;this.L()};b.prototype.L=function(){if(null!=this.g){for(var c=0;c<this.g.length;++c)l.w(this.g[c]);this.g=null}};var l=new e;b.prototype.R=function(c){var d=this.s();
c.o(d.resolve,d.reject)};b.prototype.S=function(c,d){var f=this.s();try{c.call(d,f.resolve,f.reject)}catch(h){f.reject(h)}};b.prototype.then=function(c,d){function f(n,q){return"function"==typeof n?function(w){try{h(n(w))}catch(x){m(x)}}:q}var h,m,y=new b(function(n,q){h=n;m=q});this.o(f(c,h),f(d,m));return y};b.prototype["catch"]=function(c){return this.then(void 0,c)};b.prototype.o=function(c,d){function f(){switch(h.l){case 1:c(h.v);break;case 2:d(h.v);break;default:throw Error("Unexpected state: "+
h.l);}}var h=this;null==this.g?l.w(f):this.g.push(f)};b.resolve=g;b.reject=function(c){return new b(function(d,f){f(c)})};b.race=function(c){return new b(function(d,f){for(var h=r(c),m=h.next();!m.done;m=h.next())g(m.value).o(d,f)})};b.all=function(c){var d=r(c),f=d.next();return f.done?g([]):new b(function(h,m){function y(w){return function(x){n[w]=x;q--;0==q&&h(n)}}var n=[],q=0;do n.push(void 0),q++,g(f.value).o(y(n.length-1),m),f=d.next();while(!f.done)})};return b});
function z(){z=function(){};t.Symbol||(t.Symbol=A)}function B(a,b){this.G=a;u(this,"description",{configurable:!0,writable:!0,value:b})}B.prototype.toString=function(){return this.G};var A=function(){function a(e){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new B("jscomp_symbol_"+(e||"")+"_"+b++,e)}var b=0;return a}();
function C(){z();var a=t.Symbol.iterator;a||(a=t.Symbol.iterator=t.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&u(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return D(p(this))}});C=function(){}}function D(a){C();a={next:a};a[t.Symbol.iterator]=function(){return this};return a}function E(){this.i=!1;this.c=null;this.F=void 0;this.f=1;this.B=this.I=0;this.h=null}function F(a){if(a.i)throw new TypeError("Generator is already running");a.i=!0}
E.prototype.j=function(a){this.F=a};E.prototype.m=function(a){this.h={J:a,M:!0};this.f=this.I||this.B};E.prototype["return"]=function(a){this.h={"return":a};this.f=this.B};function G(a,b){var e=H();a.f=b;return{value:e}}function I(a){this.a=new E;this.N=a}I.prototype.j=function(a){F(this.a);if(this.a.c)return J(this,this.a.c.next,a,this.a.j);this.a.j(a);return K(this)};
function L(a,b){F(a.a);var e=a.a.c;if(e)return J(a,"return"in e?e["return"]:function(g){return{value:g,done:!0}},b,a.a["return"]);a.a["return"](b);return K(a)}I.prototype.m=function(a){F(this.a);if(this.a.c)return J(this,this.a.c["throw"],a,this.a.j);this.a.m(a);return K(this)};
function J(a,b,e,g){try{var k=b.call(a.a.c,e);if(!(k instanceof Object))throw new TypeError("Iterator result "+k+" is not an object");if(!k.done)return a.a.i=!1,k;var l=k.value}catch(c){return a.a.c=null,a.a.m(c),K(a)}a.a.c=null;g.call(a.a,l);return K(a)}function K(a){for(;a.a.f;)try{var b=a.N(a.a);if(b)return a.a.i=!1,{value:b.value,done:!1}}catch(e){a.a.F=void 0,a.a.m(e)}a.a.i=!1;if(a.a.h){b=a.a.h;a.a.h=null;if(b.M)throw b.J;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
function M(a){this.next=function(b){return a.j(b)};this["throw"]=function(b){return a.m(b)};this["return"]=function(b){return L(a,b)};C();this[Symbol.iterator]=function(){return this}}function N(a){function b(g){return a.next(g)}function e(g){return a["throw"](g)}new Promise(function(g,k){function l(c){c.done?g(c.value):Promise.resolve(c.value).then(b,e).then(l,k)}l(a.next())})}window.addEventListener("load",function(){O()});
function H(){var a=rotateTime;return new Promise(function(b){return setTimeout(b,a)})}
function O(){N(new M(new I(function(a){switch(a.f){case 1:return document.getElementById("skinurl").value=skin1,G(a,2);case 2:return document.getElementById("skinurl").value=skin2,G(a,3);case 3:return document.getElementById("skinurl").value=skin3,G(a,4);case 4:return document.getElementById("skinurl").value=skin4,G(a,5);case 5:return document.getElementById("skinurl").value=skin5,G(a,6);case 6:return document.getElementById("skinurl").value=skin6,G(a,7);case 7:O(),a.f=0}})))};