Ideally I would like this to be a checkbox so I have come up with the following:
Added the following to: js/custom.js
ajaxChat.setInvisibility function validate() {
if (document.getElementById('invisibilitySetting').checked) {
alert("checked");
} else {
alert("You didn't check it! Let me check it for you.");
}
}
I also created a new entry in the settings menu:
lib/template/loggedIn.html
<dl>
<dt><label for="invisibilitySetting">[LANG]settingsInvisibility[/LANG]</label></dt>
<dd><input type="checkbox" id="invisibilitySetting" onclick="ajaxChat.setInvisibility();"/></dd>
</dl>
Updated the code above to work properly (getting alerts now).