Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Mr.Easybb (1587)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Bloodbath (745)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Rukiafan (533)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Dom (513)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
puppycheese (446)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
pedro (330)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Neymar (301)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Hitsu (281)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 
Flora (275)
Disable document.title changing in AvacWeb Chat Vote_lcapDisable document.title changing in AvacWeb Chat Voting_barDisable document.title changing in AvacWeb Chat Vote_rcap 


Disable document.title changing in AvacWeb Chat

haru hatterharu hatter
Status : No status yet...

Posts : 3
Join date : 2013-02-02
Sun 03 Feb 2013, 12:14
So, that's what I'm trying to ask. How can I disable that feature? Thank's for answering.
LGforumLGforum
Status : Working to restore AWC!

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" />';
    }
});