A
A
andreyzhuk2019-12-11 12:08:24
CMS
andreyzhuk, 2019-12-11 12:08:24

How to make this script visible only on smartphones?

<script type="text/javascript"> 
    (function () {
        var options = {
            whatsapp: "+7 (926) 706-63-27", // WhatsApp number
            telegram: "1034327912:AAFWWs8YCGIOv_ITBo030qG7W7YcPts1W2Q", // Telegram bot username
            call: "+7 (944) 444-44-30", // Call phone number
            call_to_action: "Message us", // Call to action
            button_color: "#A8CE50", // Color of button
            position: "right", // Position may be 'right' or 'left'
            order: "whatsapp,telegram,call", // Order of buttons
        };
        var proto = document.location.protocol, host = "getbutton.io", url = proto + "//static." + host;
        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url + '/widget-send-button/js/init.js';
        s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
        var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
    })();
</script>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton R., 2019-12-11
@anton_reut

https://stackoverflow.com/questions/21553267/js-to...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question