$(window).resize(function (){ var width = $("#screen").width(); $("#svg2").css("width", width + "px"); var mid = Math.floor(width / 2); $("#svg2").css("margin-left", "calc(50% - " + mid + "px)"); } ); var width = $("#screen").width(); $("#svg2").css("width", (width - 1) + "px"); var mid = Math.floor(width / 2); $("#svg2").css("margin-left", "calc(50% - " + mid + "px)"); $("#logos").fitText(); var ok = true ; var connection = _AN_New_WebSocket('wss://codeyourcloud.com:8080'); connection.onopen = function (){ console.log("open"); } ; connection.onmessage = function (message){ console.log(json); try { var json = JSON.parse(message.data); if (json.type === "ok") { } } catch (e) { } } ; function comment(){ var name = strip(document.getElementById("comment_name").value); var mail = strip(document.getElementById("comment_mail").value); var text = strip(document.getElementById("comment_comment").value); var agree = $("#agree-checkbox").prop("checked"); var info = { name: name, email: mail, comment: text, accept: agree} ; $.ajax("https://codeyourcloud.com/comment", { method: "POST", data: info, success: function (data, textStatus, jqXHR){ console.log(data); } , error: function (jqXHR, textStatus, errorThrown){ throw errorThrown } } ); document.getElementById("comment_name").value = ""; document.getElementById("comment_mail").value = ""; document.getElementById("comment_comment").value = ""; } function resetForm(){ document.getElementById("comment_name").value = ""; document.getElementById("comment_mail").value = ""; document.getElementById("comment_comment").value = ""; } function strip(string){ var ret = string.split("(").join("").split(")").join(""); ret = ret.split("{").join("").split("}").join(""); ret = ret.split("+").join("").split("-").join(""); ret = ret.split(";").join("").split("<").join("").split(">").join(""); return ret; } (function (i, s, o, g, r, a, m){ i.GoogleAnalyticsObject = r; i[r] = i[r] || function (){ (i[r].q = i[r].q || [] ).push(arguments); } , i[r].l = 1 * new Date(); a = _AN_Call_createelement("createElement", s, o), m = _AN_Call_getelementsbytagname("getElementsByTagName", s, o)[0]; a.async = 1; _AN_Write_src("src", a, false , g); m.parentNode.insertBefore(a, m); } )(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-47415821-1', 'codeyourcloud.com'); ga('send', 'pageview');