05-tilda-export-backup/Tilda_ Рафаловичи_ кланы, деньги_files/t-helpbubble.min.js

24 lines
74 KiB
JavaScript
Raw Normal View History

2025-10-29 16:50:39 +00:00
function showHelpBubble(){td__help__showBubble()}function td__help__showBubble(){var t="https://tilda."+window.location.origin.split(".").pop(),e=document.createElement("div"),i=(e.classList.add("t-help-bubble"),e.id="t-help-bubble",e.addEventListener("click",td__help__showPanel),document.createElement("img")),t=(i.classList.add("tc-help__questioniconimg"),i.src=t+"/tpl/img/basic_question_1.svg",document.createElement("style"));t.innerHTML=`
.t-help-bubble {
position: fixed;
bottom: 30px;
right: 30px;
border-radius: 100px;
width: 60px;
height: 60px;
background-color: rgba(250, 134, 105, 0.9);
z-index: 1004;
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);
cursor: pointer;
}
.tc-help__questioniconimg {
width:100%;height:100%;
}
@media (max-width: 640px) {
.t-help-bubble {
width: 35px;
height: 35px;
}
}
`.trim().replace(/\n|\r/g,"").replace(/\s+/g,""),e.appendChild(i),e.appendChild(t),document.body.appendChild(e)}function td__help__showPanel(){var i,t,e,l,a=document.querySelector(".t-help-bubble"),a=(a&&(a.style.display="none"),document.querySelector(".tc-help"));a?(t=document.querySelector(".tc-help__search-input"),a.style.display="block",t&&t.focus(),document.addEventListener("keyup",td__help__keyUpFunc)):(e=(a=td__help__getData()).topics,a=a.questions,i="https://tilda."+window.location.origin.split(".").pop(),l=(l='<div class="tc-help"><div class="tc-help__body"><div class="tc-help__header"><div class="tc-help__header-title-wrapper"><div class="tc-help__header-title">{{help_center}}</div></div>')+'<div class="tc-help__header-close-wrapper" onclick="td__help__closePanel();"><div class="tc-help__header-close"><img src="'+i+'/tpl/img/page/tp-08-close.svg" class="tc-help__header-close-ico"></div></div></div>',"no"!==window.help_showsearch&&(l=(l+='<div class="tc-help__search" style="padding-top:15px;padding-bottom: 15px;background-color: #fa8669;"><div class="tc-help__search-wrapper">')+'<input type="text" class="tc-help__search-input t-searcher" value="" placeholder="{{enter_question}}" data-attr-lang="'+("RU"==lang?"RU":"DE"==lang?"DE":"EN")+'"><img src="'+i+'/tpl/img/td-search.svg" style="width:15px;opacity:0.3;position:absolute; top:18px;left:15px;"><div class="t-searcher-close" style="position:absolute;cursor:pointer;width:15px;height:15px;top:15px;right:5px;display:none;"><img class="t-searcher-close-img" style="opacity:0.8; width:15px; height:15px;" src="https://answers.tilda.cc/src/images/Tilda_Icons_27bu_8.svg"></div><div class="t-searcher-load" style="display:none;position:absolute;cursor:pointer;width:15px;height:15px;top:15px;right:5px;"><img class="t-searcher-load-img" style=" opacity:0.5; width: 15px; height:15;" src="https://answers.tilda.cc/src/images/arrows_rotate.svg"></div></div></div>'),l+='<div class="tc-help__types">',Array.prototype.forEach.call(e,function(t,e){l=(l+='<div class="tc-help__type-body">')+'<a href="javascript:td__help__clicktopic('+e+');" class="tc-help__type"><div class="tc-help__type-title-wrapper"><div class="tc-help__type-title">'+t.title+'</div></div><div class="tc-help__type-icon-wrapper"><div class="tc-help__type-icon-plus"><img src="'+i+'/tpl/img/page/tp-12-down.svg" style="width:15px;"></div><div class="tc-help__type-icon-minus"><img src="'+i+'/tpl/img/page/tp-14-line.svg" style="opacity:0.3;"></div></div></a><div class="tc-help__type-questions tc-help__type-questions__'+e+'">',Array.prototype.forEach.call(t.items,function(t){l+='<a href="'+t.link+'" target="_blank" class="tc-help__type-quesition tc-help__item">'+t.title+"</a>"}),l+="</div></div>"}),l+='</div><div class="tc-help__items"><div class="tc-help__items-caption">{{faq}}</div>',Array.prototype.forEach.call(a,function(t){l+='<a href="'+t.link+'" target="_blank" class="tc-help__item">'+t.title+"</a>"}),l=td__help__translate(l=(l=(l=(l=(l=(l=(l+="</div>")+"</div>"+'<div class="tc-help__footer">')+('<div class="tc-help__footer-wrapper'+("DE"===lang?" tc-help__footer-wrapper_de":"")+'">'))+'<table style="width:100%;"><tr><td>'+'<div class="tc-help__send-btn-hint">{{did_not_find_answer}}</div>')+'</td><td style="text-align:right;">'+('<a href="'+i+'/tickets/" class="tc-help__send-btn" target="_blank" style="white-space:nowrap;">{{send_us_message}}</a>'))+"</td></tr></table>"+"</div>")+"</div>"+"</div>"),document.body.insertAdjacentHTML("beforeend",l),document.addEventListener("keyup",td__help__keyUpFunc),(t=document.querySelector(".tc-help__search-input"))&&t.focus(),"no"!==window.help_showsearch&&(document.getElementById("answers-script")||((e=document.createElement("script")).src="https://answers.tilda.cc/src/js/searcher-popup.js",e.id="answers-script",document.head.appendChild(e)),document.getElementById("answers-styles")||((a=document.createElement("link")).href="https://answers.tilda.cc/src/css/style-1.1.css",a.id="answers-styles",a.type="text/css",a.rel="stylesheet",document.head.appendChild(a))))}function td__help