/* nodelab selfreg api loader */ (function() { // Localize jQuery variable var jQuery; /******** Load jQuery if not present *********/ if (window.jQuery === undefined || window.jQuery.fn.jquery !== "3.2.1") { var script_tag = document.createElement("script"); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "https://app.nodelab.ch/api/assets/jquery.min.js"); if (script_tag.readyState) { script_tag.onreadystatechange = function () { // For old versions of IE if (this.readyState == "complete" || this.readyState == "loaded") { scriptLoadHandler(); } }; } else { script_tag.onload = scriptLoadHandler; } // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { // The jQuery version on the window is the one we want to use jQuery = window.jQuery; main(); } /******** Called once jQuery has loaded ******/ function scriptLoadHandler() { // Restore $ and window.jQuery to their previous values and store the // new jQuery in our local jQuery variable jQuery = window.jQuery.noConflict(true); // Call our main function main(); } /******** Our main function ********/ function main() { jQuery(document).ready(function($) { /******* Load HTML *******/ /* params={};location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){params[k]=v}); switch(params.action){ case "check_config": //$apiparam = "a=". }*/ var jsonp_url = "https://app.nodelab.ch/api/?a=s&cont=0002626af732d4fb30001"; $.getJSON(jsonp_url, function(data) { $("#nodelab-0002626af732d4fb30001").html(data.html); if(data.code){ eval(data.code);} }); }); } })(); // We call our anonymous function immediately function ajax(){ }