So, that's what I'm trying to ask. How can I disable that feature? Thank's for answering.
Like SystemFri 15 Oct 2021, 04:50
Auto Save MessagesFri 26 Feb 2021, 13:31
New tutorial questionMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)Sun 14 Feb 2021, 01:25
Does anybody have the original Avacweb Chat CSS?Tue 09 Feb 2021, 13:40
Page 1 of 1 •
Disable document.title changing in AvacWeb Chat
haru hatter
Status : No status yet...
Posts : 3
Join date : 2013-02-02
Posts : 3
Join date : 2013-02-02
Sun 03 Feb 2013, 12:14
LGforum
Status : Working to restore AWC!
Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sun 03 Feb 2013, 12:35
You simply need to prevent the default action of the 'onnew' event, and add your own:
- Code:
[panda=js]avacweb_chat_config.add_event('onnew', function(e) {
e.preventDefault();
if(!avacweb_chat.open) { //if the chat is closed, light up the button.
avacweb_chat.button.style.backgroundColor = avacweb_chat.light_up_color;
}
if(avacweb_chat.user_settings.sound) { //if the user wants sound, play the sound
document.getElementById('achat_sound').innerHTML = '<embed src="' + avacweb_chat.sound_file + '" hidden="true" autostart="true" loop="false" />';
}
});