danielm/uploader

contact-buttons-widget.min

doancuongc1 opened this issue · 0 comments

/*!

  • Name: Contact Button Widget
  • Author: Designer
  • Website: c1doancuong.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=''+_widget_settings.buttons.contact.messages+"";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=''+_widget_settings.buttons.email.messages+"";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=''+_widget_settings.buttons.call.messages+"";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=''+_widget_settings.buttons.sms.messages+"";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=''+_widget_settings.buttons.viber.messages+"";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=''+_widget_settings.buttons.telegram.messages+"";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=''+_widget_settings.buttons.zalo.messages+"";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=''+widget_settings.buttons.facebook.messages+"";else"false"==widget_settings.buttons.facebook.visible?l="":alert("You must set the visible value to true or false");var d='
    '+widget_settings.support.staff.name+'
    '+widget_settings.support.staff.messages+"
    ",g='',u='',r='',w='';if(null!=localStorage.getItem("saved_storage")&&"true"==localStorage.getItem("saved_storage"))var c='
    '+e+i+s+o+n+a+b+l+'
    '+g+'
    '+u+'
    '+r+'
    '+w+"
    ";else c='
    '+d+'
    '+e+i+s+o+n+a+b+l+'
    '+g+'
    '+u+'
    '+r+'
    '+w+"
    ";$(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();