// ==UserScript== // @name SetDeli Client Script // @version 0.1 // @description Adds additional functionality to the Pokemon Showdown Teambuilder // @copyright 2019 fender, nineage // @include *//play.pokemonshowdown.com/* // ==/UserScript==set-deli // @require http://code.jquery.com/jquery-3.3.1.min.js // insertion-query v1.0.3 (2016-01-20) // license:MIT // Zbyszek Tenerowicz (http://naugtur.pl/) var insertionQ=function(){"use strict";function a(a,b){var d,e="insQ_"+g++,f=function(a){(a.animationName===e||a[i]===e)&&(c(a.target)||b(a.target))};d=document.createElement("style"),d.innerHTML="@"+j+"keyframes "+e+" { from { outline: 1px solid transparent } to { outline: 0px solid transparent } }\n"+a+" { animation-duration: 0.001s; animation-name: "+e+"; "+j+"animation-duration: 0.001s; "+j+"animation-name: "+e+"; } ",document.head.appendChild(d);var h=setTimeout(function(){document.addEventListener("animationstart",f,!1),document.addEventListener("MSAnimationStart",f,!1),document.addEventListener("webkitAnimationStart",f,!1)},n.timeout);return{destroy:function(){clearTimeout(h),d&&(document.head.removeChild(d),d=null),document.removeEventListener("animationstart",f),document.removeEventListener("MSAnimationStart",f),document.removeEventListener("webkitAnimationStart",f)}}}function b(a){a.QinsQ=!0}function c(a){return n.strictlyNew&&a.QinsQ===!0}function d(a){return c(a.parentNode)?a:d(a.parentNode)}function e(a){for(b(a),a=a.firstChild;a;a=a.nextSibling)void 0!==a&&1===a.nodeType&&e(a)}function f(f,g){var h=[],i=function(){var a;return function(){clearTimeout(a),a=setTimeout(function(){h.forEach(e),g(h),h=[]},10)}}();return a(f,function(a){if(!c(a)){b(a);var e=d(a);h.indexOf(e)<0&&h.push(e),i()}})}var g=100,h=!1,i="animationName",j="",k="Webkit Moz O ms Khtml".split(" "),l="",m=document.createElement("div"),n={strictlyNew:!0,timeout:20};if(m.style.animationName&&(h=!0),h===!1)for(var o=0;o" + res.data[i].name + ""; } output += ""; $(".pokemonedit-buttons").append(output); $("#choose-set").on("change", function() { var set = $(this).children("option:selected").val(); for (var i = 0; i < res.data.length; i++) { if (res.data[i].name === set) { $(".pokemonedit").val(constructSetString(mon, res.data[i], meta)); } } }); } else { $(".pokemonedit-buttons").append("Unable to load smogon sets for this pokemon."); } }); }); });