"
if(feedback_data['ismobile']){
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}else{
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}
}
}else if(feedback_data['lang'] == "fr"){
if(document.getElementById('helpful-btn')){
var helpful_html="
"
if(feedback_data['ismobile']){
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}else{
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}
}
}else{
if(document.getElementById('helpful-btn')){
var helpful_html="
"
var helpful_btn = document.getElementById('helpful-btn').innerHTML = '
'
}
if(!feedback_data['style']){
if(feedback_data['site_id'] != "3"){
feedback_data['style'] = "background: black;border-radius: 0;color: #fff;display: inline-block;font-size: 17px;height: 43px;line-height: 50px;position: fixed;left: -65px;text-align: center;text-decoration: none; -moz-transform: rotate(-90deg);-ms-transform: rotate(-90deg);-o-transform: rotate(-90deg);-webkit-transform: rotate(-90deg);transform-origin: bottom right;width: 100px!important;border:none;font-family: system-ui;letter-spacing: 0px;bottom:45%;cursor:pointer;font-weight: 400!important;z-index: 1;"
}else{
feedback_data['style'] = "color:#fff;background: #e51c23;padding:10px 10px;border-radius:30px;font-size:1rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);font-weight:500;margin:10px 0;display:inline-block;cursor:pointer;position:relative;border:none;font-family: Helvetica Neue, Roboto, sans-serif;font-size: 11px;";
}
}else{
if(feedback_data['site_id'] != "3"){
feedback_data['style'] = "background: black;border-radius: 0;color: #fff;display: inline-block;font-size: 17px;height: 43px;line-height: 50px;position: fixed;left: -65px;text-align: center;text-decoration: none; -moz-transform: rotate(-90deg);-ms-transform: rotate(-90deg);-o-transform: rotate(-90deg);-webkit-transform: rotate(-90deg);transform-origin: bottom right;width: 100px!important;border:none;font-family: system-ui;letter-spacing: 0px;bottom:45%;cursor:pointer;font-weight: 400!important;z-index: 1;"
}
}
if(document.getElementById('feedback-btn')){
var iframe_html = "
"
if(feedback_data['site_id'] == "3" && feedback_data['ismobile']){
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}else if(feedback_data['ismobile']){
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}else{
var feedback_btn = document.getElementById('feedback-btn').innerHTML = '
'
}
}
}
}
function display_overlay_specific(button) {
var class_name = button.className;
var iframe = document.getElementById('iframe_fb');
var iframeWindow = iframe.contentWindow;
var iframeDoc = iframeWindow.document;
var input = iframeDoc.querySelector('#feedback-form > input.'+class_name);
input.setAttribute('checked', 'true');
display_overlay()
}
function hide_button(){
document.getElementById('feedback-button').innerHTML = '
';
document.getElementById('feedback-button').style.width = '25px';
if(feedback_data['site_id'] == "3" && feedback_data['ismobile']){
document.getElementById('feedback-button').style.left = '25px';
}
}
function show_button(){
if(feedback_data['site_id'] == "3" && feedback_data['ismobile']){
document.getElementById('feedback-button').style.width = '120px';
document.getElementById('feedback-button').style.left = '65px';
}else if(feedback_data['ismobile']){
document.getElementById('feedback-button').style.width = '50px';
}else{
document.getElementById('feedback-button').style.width = '60px';
}
if(feedback_data.lang == 'ar'){
if(feedback_data['ismobile']){
document.getElementById('feedback-button').innerHTML = '
x يخفي
'
}else{
document.getElementById('feedback-button').innerHTML = '
x يخفي
'
}
}else if(feedback_data.lang == 'fr'){
if(feedback_data['ismobile']){
document.getElementById('feedback-button').innerHTML = '
x cacher
'
}else{
document.getElementById('feedback-button').innerHTML = '
x cacher
'
}
}else{
if(feedback_data['ismobile']){
document.getElementById('feedback-button').innerHTML = '
x hide
'
}else{
document.getElementById('feedback-button').innerHTML = '
x hide
'
}
}
}
function display_overlay() {
feedback_data['lc_chat_id'] = (parent.LC_API?parent.LC_API.get_chat_id():'');
if(feedback_data['lc_chat_id']){
var iframe = document.getElementById('iframe_fb');
var iframeWindow = iframe.contentWindow;
var iframeDoc = iframeWindow.document;
iframeDoc.querySelector('#feedback-form > input[type=hidden]:nth-child(11)').value = feedback_data['lc_chat_id'];
}
document.getElementById("overlay").style.display = "block";
document.querySelector("#iframe_fb").style.maxHeight = document.querySelector("#iframe_fb").contentWindow.document.body.scrollHeight + 15 + "px";
}
function hide_overlay() {
document.getElementById("overlay").style.display = "none";
set_feedback_html();
}