Quote:
Originally Posted by Aeris
Oh, wonderful, thanks!
I'm trying with:
Code:
document.getElementsByClassName("statusBarConnectionDiv").onclick=function(){
var invertedState = (ConnectionState.connectionOnOff ? 0 : 1);
nativeBridge.setIntLipcProperty("com.lab126.cmd", "wirelessEnable", invertedState);
};
But don't know where place the code exactly in the script for make it work (PS the forum puts a space that breaks "connection" word, don't know why)
|
First of all, result of
getElementsByClassName is a NodeList, not an element usable for attaching event listeners.
But then, after disabling wireless this div is hidden by default script (using
display: none style), so it couldn't be clicked afterwards, until wireless is enabled again. So final solution should be more complex.
UPD: ah, it's possibly not a problem on PW where div isn't hidden, but inner icon is just changed to "airplane" (I'm speculating here, because I don't have a real PW).