<!DOCTYPE html>
<html>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=UTF8″>
<meta content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0″ name=”viewport”>
<style>
body { margin: 0; }
.goftino_chat_page { width: 100%; height: 100%; }
.loader_spin {
border: 6px solid #eeeeee;
border-top: 6px solid #00bcd4;
border-radius: 50%;
margin: 45vh auto 0;
width: 30px;
height: 30px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class=”goftino_chat_page”>
<div class=”loader_spin”></div>
</div>
<script type=”text/javascript”>
var goftino_id = “ybwvg5”;
var queryParam = “phone”;
var url_query = {};
window.location.href.split(/\?(.*)?$/).slice(1).join(“”).split(“&”).forEach(function(i) {
if (!i) return;
var t = i.split(“=”);
url_query[t[0]] = t[1];
});
function getParam(paramName) {
var params = new URLSearchParams(window.location.search);
var value = params.get(paramName);
return value ? decodeURIComponent(value).trim() : “”;
}
var g = document.createElement(“script”),
s = “https://www.goftino.com/widget/” + goftino_id + “?page=1&”,
l = localStorage.getItem(“goftino_” + goftino_id);
if (url_query.userid && url_query.userid.length === 64) {
l = url_query.userid;
localStorage.setItem(“goftino_” + goftino_id, l);
}
g.async = true;
g.src = l ? s + “o=” + l : s;
if (url_query.op) {
g.src += “&assign=” + url_query.op;
}
document.getElementsByTagName(“head”)[0].appendChild(g);
window.addEventListener(“goftino_ready”, function() {
var phone = getParam(queryParam);
if (phone) {
Goftino.setUser({
name: phone,
phone: phone,
about: “ورود از لینک دارای شماره”,
forceUpdate: true
});
}
Goftino.open();
Goftino.setWidget({ icon: false });
var gw = document.getElementById(“goftino_w”);
var gf = gw && (gw.contentWindow || gw.contentDocument);
if (gf && gf.document) gf = gf.document;
if (gf) {
var boxChat = gf.getElementById(“box-chat”);
if (boxChat) {
boxChat.style.borderRadius = “0”;
boxChat.style.width = “100%”;
boxChat.style.height = “100%”;
boxChat.style.margin = “0”;
}
if (window.innerWidth > 768) {
var boxSend = gf.getElementById(“box-send”);
if (boxSend) boxSend.style.minHeight = “70px”;
}
var chatContent = gf.getElementsByClassName(“box-chat-content”);
if (chatContent.length > 0) {
chatContent[0].style.height = “calc(100vh + 8px)”;
}
var closeBtn = gf.getElementById(“btn-close-chat”);
if (closeBtn) closeBtn.style.display = “none”;
}
});
</script>
</body>
</html>


