GetCourse
June 14, 2023

Скрипт для улучшения работы отдела продаж на GetCourse


Что он дает и как его использовать рассказал в видео

Скрипт для копирования:

<script>
$(function(){
  window.isMobile = /Mobile|webOS|BlackBerry|IEMobile|MeeGo|mini|Fennec|Windows Phone|Android|iP(ad|od|hone)/i.test(navigator.userAgent);
  var nint = setInterval(function() {
    if($('#whatsapp_button').length == 0) {
      if($(".user-phone-widget").length) {
        var phone = $('.user-phone span[data-reactid=".0.1.1.0.0.1.4.2"]').text().replace(/\D+/g,'');
        if(phone[0] == 3 && phone.length == 10) phone = "39"+phone;
        if(phone[0] == 9 && phone.length == 10) phone = "7"+phone;
        if(phone[0] == 8 && phone.length == 11) phone = "7"+phone.slice(1);
        $(".user-phone-widget").after(`
          <span><a href="${(window.isMobile ? 'viber://add?number=' : 'viber://chat?number=') + "+" + phone}" target="_blank">
            <button id="viber_button" class="btn btn-sm btn-default" style="
              margin: 0 0 3px;
              background-color: #59267c;
              color: white;
              padding: 4px 5px;
              border: none;
              border-radius: 30px;
              height: 22px;
            "><svg style="width: 12px; margin-top: 1px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="viber" class="svg-inline--fa fa-viber fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M444 49.9C431.3 38.2 379.9.9 265.3.4c0 0-135.1-8.1-200.9 52.3C27.8 89.3 14.9 143 13.5 209.5c-1.4 66.5-3.1 191.1 117 224.9h.1l-.1 51.6s-.8 20.9 13 25.1c16.6 5.2 26.4-10.7 42.3-27.8 8.7-9.4 20.7-23.2 29.8-33.7 82.2 6.9 145.3-8.9 152.5-11.2 16.6-5.4 110.5-17.4 125.7-142 15.8-128.6-7.6-209.8-49.8-246.5zM457.9 287c-12.9 104-89 110.6-103 115.1-6 1.9-61.5 15.7-131.2 11.2 0 0-52 62.7-68.2 79-5.3 5.3-11.1 4.8-11-5.7 0-6.9.4-85.7.4-85.7-.1 0-.1 0 0 0-101.8-28.2-95.8-134.3-94.7-189.8 1.1-55.5 11.6-101 42.6-131.6 55.7-50.5 170.4-43 170.4-43 96.9.4 143.3 29.6 154.1 39.4 35.7 30.6 53.9 103.8 40.6 211.1zm-139-80.8c.4 8.6-12.5 9.2-12.9.6-1.1-22-11.4-32.7-32.6-33.9-8.6-.5-7.8-13.4.7-12.9 27.9 1.5 43.4 17.5 44.8 46.2zm20.3 11.3c1-42.4-25.5-75.6-75.8-79.3-8.5-.6-7.6-13.5.9-12.9 58 4.2 88.9 44.1 87.8 92.5-.1 8.6-13.1 8.2-12.9-.3zm47 13.4c.1 8.6-12.9 8.7-12.9.1-.6-81.5-54.9-125.9-120.8-126.4-8.5-.1-8.5-12.9 0-12.9 73.7.5 133 51.4 133.7 139.2zM374.9 329v.2c-10.8 19-31 40-51.8 33.3l-.2-.3c-21.1-5.9-70.8-31.5-102.2-56.5-16.2-12.8-31-27.9-42.4-42.4-10.3-12.9-20.7-28.2-30.8-46.6-21.3-38.5-26-55.7-26-55.7-6.7-20.8 14.2-41 33.3-51.8h.2c9.2-4.8 18-3.2 23.9 3.9 0 0 12.4 14.8 17.7 22.1 5 6.8 11.7 17.7 15.2 23.8 6.1 10.9 2.3 22-3.7 26.6l-12 9.6c-6.1 4.9-5.3 14-5.3 14s17.8 67.3 84.3 84.3c0 0 9.1.8 14-5.3l9.6-12c4.6-6 15.7-9.8 26.6-3.7 14.7 8.3 33.4 21.2 45.8 32.9 7 5.7 8.6 14.4 3.8 23.6z"></path></svg>
            </button>
          </a></span>
        `).after(`
          <span><a href="${(window.isMobile ? 'https://wa.me/' : 'https://web.whatsapp.com/send?phone=') + "+" + phone}" target="_blank">
            <button id="whatsapp_button" class="btn btn-sm btn-default" style="
              margin: 0 0 3px;
              background-color: #25D366;
              color: white;
              padding: 4px 5px;
              border: none;
              border-radius: 30px;
              height: 22px;
            "><svg style="width: 12px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="whatsapp" class="svg-inline--fa fa-whatsapp fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"></path></svg>
            </button>
          </a></span>
        `).after(`
          <span><a href="${(window.isMobile ? 'https://t.me/' : 'https://t.me/') + "+" + phone}" target="_blank">
            <button id="telegram_button" class="btn btn-sm btn-default" style="
              margin: 0 0 3px;
              background-color: #0088cc;
              color: white;
              padding: 4px 5px;
              border: none;
              border-radius: 30px;
              height: 22px;
            "><svg style="width: 12px; margin-top: 1px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="telegram" class="svg-inline--fa fa-telegram fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M204 319l135 99c14 9 26 4 30-14l55-258c5-22-9-32-24-25L79 245c-21 8-21 21-4 26l83 26 190-121c9-5 17-3 11 4"></path></svg>
            </button>
          </a></span>
        `).after(`
          <span><a href="${(window.isMobile ? 'https://ДОМЕН.amocrm.ru/leads/list/?term=' : 'https://ДОМЕН.amocrm.ru/leads/list/?term=') + "+" + phone}" target="_blank">
            <button id="telegram_button" class="btn btn-sm btn-default" style="
              margin: 0 0 3px;
              background-color: #0084C0;
              color: white;
              padding: 4px 5px;
              border: none;
              border-radius: 30px;
              height: 22px;
            "><svg style="width: 12px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="whatsapp" class="svg-inline--fa fa-whatsapp fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="-0.5 0 24 24"><path fill="white" d="m20.394 19.768c.068-.033.149-.052.234-.052.041 0 .08.004.118.013l-.004-.001q.147.04.147.234c-.017.175-.09.33-.201.449-.184.21-.376.4-.582.576l-.008.006c-.377.317-.795.617-1.235.885l-.045.025c-.531.338-1.151.669-1.796.955l-.092.036c-.713.309-1.556.577-2.428.761l-.089.016c-.915.209-1.965.328-3.043.328-.011 0-.021 0-.032 0h.002c-1.134-.002-2.231-.153-3.275-.436l.088.02c-1.07-.271-2.002-.621-2.881-1.062l.081.037c-.892-.454-1.648-.916-2.365-1.43l.055.037c-.663-.462-1.241-.924-1.788-1.42l.015.013c-.399-.367-.767-.749-1.11-1.154l-.015-.018c-.059-.061-.105-.135-.132-.217l-.001-.004c-.007-.019-.011-.042-.011-.065 0-.035.009-.068.025-.096v.001c.027-.04.063-.072.106-.093l.002-.001c.036-.018.079-.028.124-.028.011 0 .021.001.032.002h-.001c.059.004.112.026.155.06h-.001c1.103.71 2.419 1.45 3.777 2.117l.24.107c2.094.999 4.552 1.583 7.146 1.583 1.259 0 2.486-.138 3.666-.398l-.112.021c1.986-.441 3.734-1.064 5.376-1.87l-.14.062zm2.772-1.54c.059.153.093.331.093.516 0 .148-.022.291-.062.425l.003-.011c-.082.516-.215.977-.397 1.414l.015-.041c-.245.661-.635 1.219-1.134 1.656l-.005.004q-.228.187-.348.121t0-.32c.203-.44.406-.979.572-1.535l.024-.092q.314-1.025.087-1.319c-.053-.068-.123-.121-.204-.153l-.003-.001c-.106-.043-.229-.071-.358-.08h-.004q-.221-.02-.395-.034c-.07-.004-.152-.007-.234-.007s-.164.002-.246.007l.011-.001q-.294.014-.422.026l-.415.04-.302.026q-.08.014-.174.02t-.147.014l-.114.014c-.027.004-.06.006-.093.006h-.134l-.04-.006-.026-.02-.02-.04q-.08-.214.63-.536c.401-.191.866-.332 1.355-.397l.024-.003c.234-.033.504-.051.779-.051.235 0 .467.014.696.04l-.028-.003q.829.078 1.017.319zm-5.28-5.933c.004.31.07.604.186.871l-.006-.015c.12.297.264.553.436.787l-.007-.01q.248.335.502.616c.136.155.281.296.435.424l.006.005.174.147-3.04 3q-.536-.495-1.058-1.011t-.777-.783l-.254-.268c-.123-.13-.233-.275-.329-.43l-.007-.012c-.354.541-.788.996-1.291 1.363l-.015.01c-.486.363-1.053.653-1.665.84l-.039.01c-.555.169-1.197.28-1.86.308l-.016.001c-.065.003-.142.005-.219.005-.582 0-1.139-.105-1.654-.297l.033.011c-.603-.222-1.124-.519-1.585-.889l.011.009c-.482-.4-.861-.908-1.103-1.488l-.009-.025c-.263-.615-.416-1.331-.416-2.083 0-.033 0-.065.001-.098v.005c0-.019 0-.041 0-.064 0-.719.138-1.406.389-2.036l-.013.037c.234-.603.56-1.121.967-1.563l-.003.003c.412-.428.881-.797 1.396-1.096l.03-.016c.468-.283 1.01-.541 1.577-.743l.064-.02c.471-.167 1.055-.327 1.653-.448l.088-.015c.433-.097.978-.184 1.533-.242l.067-.006q.663-.06 1.333-.087v-1.698c.003-.047.005-.101.005-.156 0-.418-.107-.812-.295-1.154l.006.012c-.327-.439-.844-.72-1.428-.72-.068 0-.135.004-.201.011l.008-.001q-.08 0-.221.014c-.206.039-.388.094-.561.167l.018-.007c-.286.106-.534.24-.759.402l.009-.006c-.29.228-.538.492-.742.788l-.008.012c-.266.369-.484.795-.631 1.253l-.009.032-3.938-.362c.002-.573.11-1.121.305-1.625l-.011.031c.226-.582.528-1.083.903-1.522l-.006.007c.415-.491.891-.912 1.421-1.257l.025-.015c.583-.374 1.259-.675 1.978-.868l.051-.012c.744-.208 1.598-.328 2.48-.328h.075-.004c.03 0 .066-.001.101-.001.828 0 1.627.123 2.381.351l-.058-.015c.661.188 1.238.47 1.752.836l-.017-.012c.42.314.779.681 1.075 1.096l.01.015c.245.331.449.712.593 1.122l.009.03c.101.293.162.63.167.981v.003zm-9 .282c-.001.022-.001.048-.001.074 0 .715.371 1.343.931 1.703l.008.005c.34.245.766.392 1.226.392.227 0 .446-.036.651-.102l-.015.004c.763-.243 1.341-.861 1.523-1.632l.003-.015c.119-.387.188-.832.188-1.292 0-.021 0-.043 0-.064v.003-2.17c-.537.016-1.049.074-1.547.17l.06-.01c-.541.109-1.019.264-1.47.466l.044-.017c-.948.396-1.602 1.315-1.602 2.387 0 .034.001.068.002.101v-.005z"></path></svg>
            </button>
          </a></span>
        `);
      }
    }
  },50);
});
</script>

Подписывайтесь на мой Телеграмм канал, там еще больше подобных статей и бесплатных уроков в закрепе!