#javascript #smartsupp
Вопрос:
Я хочу добавить прослушиватель событий, нажав на smartsupp
него . У меня есть только эта вещь:
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = 'f*****************89';
window.smartsupp||(function(d) {
var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
s=d.getElementsByTagName('script')[0];c=d.createElement('script');
c.type='text/javascript';c.charset='utf-8';c.async=true;
c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
smartsupp('language','<?php echo Yii::app()->language ?>');
</script>
На каком элементе я должен установить addEventListener
или как я могу сделать это правильно?
Все, что мне нужно, это нажать на окно smartsupp, и когда оно откроется, я получу console.log("OPENED")