Advertisement
Guest User

goto.js by ~spitfire

a guest
Apr 6th, 2020
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function(){/*goto.js v1.1 by ~spitfire.*/var o,t="#coordinate_input_modal",i=$(t),n=i.find("input"),d=i.find("#coord_input_cancel"),e=$("textarea");function c(){o.remove(),i.attr("id",t.slice(1)).hide(),$(n[2]).off("click.goto"),d.off("click.goto"),r(!1)}function r(o){e.attr("disabled",o)}function a(o){$("<div>").addClass("coordLink").attr("data-coordlink-tileyx",$(n[1]).val()+","+$(n[0]).val()).appendTo("#yourworld").click().remove(),c()}function l(o){c()}$.fn.center=function(){var o=($(window).height()-$(this).outerHeight())/2,t=($(window).width()-$(this).outerWidth())/2;return $(this).css({top:o,left:t}),this},r(!0),o=$("<div>").css({position:"fixed",zIndex:1001,height:"100%",width:"100%",top:0,left:0,backgroundColor:"#00000050"}).appendTo("body"),i.css({position:"fixed",zIndex:1002,height:100,width:195}).center().attr("id","simplemodal-container").show(),$(n[2]).on("click.goto",a),d.on("click.goto",l)})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement