-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact-buttons-html.min.js
6 lines (6 loc) · 14.7 KB
/
contact-buttons-html.min.js
1
2
3
4
5
6
/*!
* Name: Contact Button Widget
* Author: Việt Designer
* Website: https://www.thietkeblogspot.com
*/
function _widget_button_start(){if("top left"==_widget_settings.positions)var t="b24-widget-button-position-top-left";else"top right"==_widget_settings.positions?t="b24-widget-button-position-top-right":"top middle"==_widget_settings.positions?t="b24-widget-button-position-top-middle":"bottom left"==_widget_settings.positions?t="b24-widget-button-position-bottom-left":"bottom right"==_widget_settings.positions?t="b24-widget-button-position-bottom-right":"bottom middle"==_widget_settings.positions?t="b24-widget-button-position-bottom-middle":alert("You must set the positions value to top left or top right or top middle or bottom left or bottom right or bottom middle");if("true"==_widget_settings.buttons.contact.visible)var e='<a aria-label="'+_widget_settings.buttons.contact.messages+'" class="b24-widget-button-social-item b24-widget-button-crmform" href='+_widget_settings.buttons.contact.id+' rel="noopener nofollow" role="button" target="_blank"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.contact.messages+"</span></a>";else"false"==_widget_settings.buttons.contact.visible?e="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.email.visible)var i='<a aria-label="'+_widget_settings.buttons.email.messages+'" class="b24-widget-button-social-item connector-icon connector-icon-email" href="mailto:'+_widget_settings.buttons.email.id+'" rel="nofollow" role="button"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.email.messages+"</span></a>";else"false"==_widget_settings.buttons.email.visible?i="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.call.visible)var s='<a aria-label="'+_widget_settings.buttons.call.messages+'" class="b24-widget-button-social-item b24-widget-button-callback" href="tel:'+_widget_settings.buttons.call.id+'" rel="nofollow" role="button"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.call.messages+"</span></a>";else"false"==_widget_settings.buttons.call.visible?s="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.sms.visible)var o='<a aria-label="'+_widget_settings.buttons.sms.messages+'" class="b24-widget-button-social-item connector-icon connector-icon-sms" href="sms:'+_widget_settings.buttons.sms.id+'" rel="nofollow" role="button"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.sms.messages+"</span></a>";else"false"==_widget_settings.buttons.sms.visible?o="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.viber.visible)var n='<a aria-label="'+_widget_settings.buttons.viber.messages+'" class="b24-widget-button-social-item connector-icon connector-icon-viber" href="viber://pa?chatURI='+_widget_settings.buttons.viber.id+'" rel="noopener nofollow" role="button" target="_blank"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.viber.messages+"</span></a>";else"false"==_widget_settings.buttons.viber.visible?n="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.telegram.visible)var a='<a aria-label="'+_widget_settings.buttons.telegram.messages+'" class="b24-widget-button-social-item connector-icon connector-icon-telegrambot" href="https://teleg.one/'+_widget_settings.buttons.telegram.id+'" rel="noopener nofollow" role="button" target="_blank"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.telegram.messages+"</span></a>";else"false"==_widget_settings.buttons.telegram.visible?a="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.zalo.visible)var b='<a aria-label="'+_widget_settings.buttons.zalo.messages+'" class="b24-widget-button-social-item connector-icon connector-icon-zalo" href="https://zalo.me/'+_widget_settings.buttons.zalo.id+'" rel="noopener nofollow" role="button" target="_blank"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.zalo.messages+"</span></a>";else"false"==_widget_settings.buttons.zalo.visible?b="":alert("You must set the visible value to true or false");if("true"==_widget_settings.buttons.facebook.visible)var l='<a aria-label="'+_widget_settings.buttons.facebook.messages+'" class="b24-widget-button-social-item connector-icon connector-icon-facebook" href="http://m.me/'+_widget_settings.buttons.facebook.id+'" rel="noopener nofollow" role="button" target="_blank"><span class="b24-widget-button-social-tooltip">'+_widget_settings.buttons.facebook.messages+"</span></a>";else"false"==_widget_settings.buttons.facebook.visible?l="":alert("You must set the visible value to true or false");var d='<div class="b24-widget-button-popup-inner"><div class="b24-widget-button-popup-image"><span class="b24-widget-button-popup-image-item" style="background-image:url('+_widget_settings.support.staff.image+');"></span></div><div class="b24-widget-button-popup-content"><div class="b24-widget-button-popup-name">'+_widget_settings.support.staff.name+'</div><div class="b24-widget-button-popup-description">'+_widget_settings.support.staff.messages+"</div></div></div>",g='<svg height="28" viewBox="0 0 24 28" width="28"><path d="M815.406703,961 L794.305503,961 C793.586144,961 793,961.586144 793,962.305503 L793,983.406703 C793,984.126062 793.586144,984.712206 794.305503,984.712206 L815.406703,984.712206 C816.126062,984.712206 816.712206,984.126062 816.712206,983.406703 L816.712206,962.296623 C816.703325,961.586144 816.117181,961 815.406703,961 L815.406703,961 Z M806.312583,979.046143 C806.312583,979.454668 805.975106,979.783264 805.575462,979.783264 L796.898748,979.783264 C796.490224,979.783264 796.161627,979.445787 796.161627,979.046143 L796.161627,977.412044 C796.161627,977.003519 796.499105,976.674923 796.898748,976.674923 L805.575462,976.674923 C805.983987,976.674923 806.312583,977.0124 806.312583,977.412044 L806.312583,979.046143 L806.312583,979.046143 Z M813.55946,973.255747 C813.55946,973.664272 813.221982,973.992868 812.822339,973.992868 L796.889868,973.992868 C796.481343,973.992868 796.152746,973.655391 796.152746,973.255747 L796.152746,971.621647 C796.152746,971.213122 796.490224,970.884526 796.889868,970.884526 L812.813458,970.884526 C813.221982,970.884526 813.550579,971.222003 813.550579,971.621647 L813.550579,973.255747 L813.55946,973.255747 Z M813.55946,967.45647 C813.55946,967.864994 813.221982,968.193591 812.822339,968.193591 L796.889868,968.193591 C796.481343,968.193591 796.152746,967.856114 796.152746,967.45647 L796.152746,965.82237 C796.152746,965.413845 796.490224,965.085249 796.889868,965.085249 L812.813458,965.085249 C813.221982,965.085249 813.550579,965.422726 813.550579,965.82237 L813.550579,967.45647 L813.55946,967.45647 Z" fill="#fff" fill-rule="evenodd" transform="translate(-793 -961)"></path></svg>',u='<svg height="28" viewBox="0 0 28 30" width="28"><path d="M940.872414,978.904882 C939.924716,977.937215 938.741602,977.937215 937.79994,978.904882 C937.08162,979.641558 936.54439,979.878792 935.838143,980.627954 C935.644982,980.833973 935.482002,980.877674 935.246586,980.740328 C934.781791,980.478121 934.286815,980.265859 933.840129,979.97868 C931.757607,978.623946 930.013117,976.882145 928.467826,974.921839 C927.701216,973.947929 927.019115,972.905345 926.542247,971.731659 C926.445666,971.494424 926.463775,971.338349 926.6509,971.144815 C927.36922,970.426869 927.610672,970.164662 928.316918,969.427987 C929.300835,968.404132 929.300835,967.205474 928.310882,966.175376 C927.749506,965.588533 927.206723,964.77769 926.749111,964.14109 C926.29156,963.50449 925.932581,962.747962 925.347061,962.154875 C924.399362,961.199694 923.216248,961.199694 922.274586,962.161118 C921.55023,962.897794 920.856056,963.653199 920.119628,964.377388 C919.437527,965.045391 919.093458,965.863226 919.021022,966.818407 C918.906333,968.372917 919.274547,969.840026 919.793668,971.269676 C920.856056,974.228864 922.473784,976.857173 924.43558,979.266977 C927.085514,982.52583 930.248533,985.104195 933.948783,986.964613 C935.6148,987.801177 937.341181,988.444207 939.218469,988.550339 C940.510236,988.625255 941.632988,988.288132 942.532396,987.245549 C943.148098,986.533845 943.842272,985.884572 944.494192,985.204083 C945.459999,984.192715 945.466036,982.969084 944.506265,981.970202 C943.359368,980.777786 942.025347,980.091055 940.872414,978.904882 Z M940.382358,973.54478 L940.649524,973.497583 C941.23257,973.394635 941.603198,972.790811 941.439977,972.202844 C940.97488,970.527406 940.107887,969.010104 938.90256,967.758442 C937.61538,966.427182 936.045641,965.504215 934.314009,965.050223 C933.739293,964.899516 933.16512,965.298008 933.082785,965.905204 L933.044877,966.18514 C932.974072,966.707431 933.297859,967.194823 933.791507,967.32705 C935.117621,967.682278 936.321439,968.391422 937.308977,969.412841 C938.23579,970.371393 938.90093,971.53815 939.261598,972.824711 C939.401641,973.324464 939.886476,973.632369 940.382358,973.54478 Z M942.940854,963.694228 C940.618932,961.29279 937.740886,959.69052 934.559939,959.020645 C934.000194,958.902777 933.461152,959.302642 933.381836,959.8878 L933.343988,960.167112 C933.271069,960.705385 933.615682,961.208072 934.130397,961.317762 C936.868581,961.901546 939.347628,963.286122 941.347272,965.348626 C943.231864,967.297758 944.53673,969.7065 945.149595,972.360343 C945.27189,972.889813 945.766987,973.232554 946.285807,973.140969 L946.55074,973.094209 C947.119782,972.993697 947.484193,972.415781 947.350127,971.835056 C946.638568,968.753629 945.126778,965.960567 942.940854,963.694228 Z" fill="#fff" fill-rule="evenodd" transform="translate(-919 -959)"></path></svg>',r='<svg height="28" viewBox="0 0 28 29" width="28"><path d="M878.289968,975.251189 L878.289968,964.83954 C878.289968,963.46238 876.904379,962 875.495172,962 L857.794796,962 C856.385491,962 855,963.46238 855,964.83954 L855,975.251189 C855,976.924031 856.385491,978.386204 857.794796,978.090729 L860.589592,978.090729 L860.589592,981.876783 L860.589592,983.76981 L861.521191,983.76981 C861.560963,983.76981 861.809636,982.719151 862.45279,982.823297 L866.179185,978.090729 L875.495172,978.090729 C876.904379,978.386204 878.289968,976.924031 878.289968,975.251189 Z M881.084764,971.465135 L881.084764,976.197702 C881.43316,978.604561 879.329051,980.755508 876.426771,980.93027 L868.042382,980.93027 L866.179185,982.823297 C866.400357,983.946455 867.522357,984.94992 868.973981,984.716324 L876.426771,984.716324 L879.221567,988.502377 C879.844559,988.400361 880.153166,989.448891 880.153166,989.448891 L881.084764,989.448891 L881.084764,987.555864 L881.084764,984.716324 L882.947962,984.716324 C884.517696,984.949819 885.742758,983.697082 885.742758,981.876783 L885.742758,974.304675 C885.742659,972.717669 884.517597,971.465135 882.947962,971.465135 L881.084764,971.465135 Z" fill="#fff" fill-rule="evenodd" transform="translate(-855 -962)"></path></svg>',w='<svg height="29" viewBox="0 0 29 29" width="29"><path d="M18.866 14.45l9.58-9.582L24.03.448l-9.587 9.58L4.873.447.455 4.866l9.575 9.587-9.583 9.57 4.418 4.42 9.58-9.577 9.58 9.58 4.42-4.42" fill="#fff" fill-rule="evenodd"></path></svg>';if(null!=localStorage.getItem("saved_storage")&&"true"==localStorage.getItem("saved_storage"))var c='<div><div class="b24-widget-button-shadow"></div><div class="b24-widget-button-wrapper '+t+' b24-widget-button-visible"><div class="b24-widget-button-social b24-widget-button-hide">'+e+i+s+o+n+a+b+l+'</div><div class="b24-widget-button-inner-container"><div class="b24-widget-button-inner-mask"></div><div class="b24-widget-button-block"><div class="b24-widget-button-pulse b24-widget-button-pulse-animate"></div><div class="b24-widget-button-inner-block"><div class="b24-widget-button-icon-container"><div class="b24-widget-button-inner-item b24-widget-button-icon-animation">'+g+'</div><div class="b24-widget-button-inner-item">'+u+'</div><div class="b24-widget-button-inner-item">'+r+'</div></div><div class="b24-widget-button-inner-item b24-widget-button-close">'+w+"</div></div></div></div></div></div>";else c='<div><div class="b24-widget-button-shadow"></div><div class="b24-widget-button-wrapper '+t+' b24-widget-button-visible"><div class="b24-widget-button-popup b24-widget-button-popup-show"><span class="b24-widget-button-popup-btn-hide"></span>'+d+'<div class="b24-widget-button-popup-triangle"></div></div><div class="b24-widget-button-social b24-widget-button-hide">'+e+i+s+o+n+a+b+l+'</div><div class="b24-widget-button-inner-container"><div class="b24-widget-button-inner-mask"></div><div class="b24-widget-button-block"><div class="b24-widget-button-pulse b24-widget-button-pulse-animate"></div><div class="b24-widget-button-inner-block"><div class="b24-widget-button-icon-container"><div class="b24-widget-button-inner-item b24-widget-button-icon-animation">'+g+'</div><div class="b24-widget-button-inner-item">'+u+'</div><div class="b24-widget-button-inner-item">'+r+'</div></div><div class="b24-widget-button-inner-item b24-widget-button-close">'+w+"</div></div></div></div></div></div>";$(c).appendTo("body"),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&$("html").addClass("bx-touch crm-widget-button-mobile");var v=$(".b24-widget-button-icon-container>.b24-widget-button-inner-item");$(v).queue(function t(e){var i=$(this);$(v).each(function(t,e){i.queue(function(t){$(e).addClass("b24-widget-button-icon-animation"),t()}).delay(1500).queue(function(t){$(e).removeClass("b24-widget-button-icon-animation"),t()})}),i.queue(t),e()});var p=$(".b24-widget-button-shadow"),m=$(".b24-widget-button-wrapper"),_=$(".b24-widget-button-social");$(".b24-widget-button-inner-container").click(function(t){t.stopPropagation(),$("html").toggleClass("crm-widget-button-mobile"),$(p).hasClass("b24-widget-button-show")?$(p).removeClass("b24-widget-button-show").addClass("b24-widget-button-hide"):$(p).hasClass("b24-widget-button-hide")?$(p).removeClass("b24-widget-button-hide").addClass("b24-widget-button-show"):$(p).addClass("b24-widget-button-show"),$(_).hasClass("b24-widget-button-show")?$(_).removeClass("b24-widget-button-show").addClass("b24-widget-button-hide"):$(_).hasClass("b24-widget-button-hide")&&$(_).removeClass("b24-widget-button-hide").addClass("b24-widget-button-show"),$(m).toggleClass("b24-widget-button-bottom")}),$(".b24-widget-button-popup-btn-hide,.b24-widget-button-inner-container").click(function(){$(".b24-widget-button-popup").removeClass("b24-widget-button-popup-show").addClass("b24-widget-button-popup-hide"),localStorage.setItem("saved_storage","true")}),$("html").click(function(){$(this).removeClass("crm-widget-button-mobile"),$(p).removeClass("b24-widget-button-show b24-widget-button-hide"),$(_).removeClass("b24-widget-button-show").addClass("b24-widget-button-hide"),$(m).removeClass("b24-widget-button-bottom")})}_widget_button_start();