Thank you ~ butmjau-mjau wrote: Ok, so here is the integration. It's still not clear to me what is supposed to happen on button "click", and where are the Talk Javascript files? I assume you will load the Javascript files for Talk separately. Also, I see function "plusFriendChat", but that is not triggered from anywhere.
The below requires that you already have at least one button (for example audio player) in the plugin buttons on the right, so that it can be used by the Javascript:
1. Upload the PNG logo to /content/custom/files/images/kakao.png from your panel, so that it can be accessed from that URL.
2. Settings > Custom > Custom CSS:3. Settings > Custom > Custom Javascript:Code/* I don't know what this is for, but assume it's for the chat window that loads */ .kakaoChat { position: fixed; z-index: 999; right: 15px; /* Position */ bottom: 20px; /* Position */ } /* for the custom button */ #button_talk > span:after { content: 'Talk'; } #button_talk img { width: 24px; }
Code// I don't know what this is for ... function plusFriendChat() { Kakao.Channel.chat({ channelPublicId: 'ID' // kakao talk channel ID }); } // X3 is loaded function x3_load(){ setTimeout(function(){ // get buttons container var plugin_buttons = document.getElementById('x3_plugin_buttons'); if(!plugin_buttons) return; // insert new custom button with custom icon plugin_buttons.insertAdjacentHTML('beforeend', '<button id="button_talk" style="opacity:1"><span></span><img src="/content/custom/files/images/kakao.png"></button>'); var button_talk = document.getElementById('button_talk'); // click event for custom button. I see Kakako.init(), which surely requires some other Javascript ... button_talk.addEventListener('click', function(){ // console.log('click'); Kakao.init('JavaScript key'); }); }, 1000); }
When I do this, the button works