When I'm at work, I prefer using Gmail's encrypted chat feature because it logs chats without saving anything to the hard drive. However, when I'm at home, I switch to Pidgin as logging into Gmail chat at home can lead to messages ending up in the wrong place. So, every time I log into Gmail at either location, there's a need to adjust my chat settings accordingly.
I wish there was a way to automate this process based on where I am accessing Gmail from - like disabling chat automatically when I start Firefox at home and enabling it when I start Firefox at work. Is it possible to achieve this using a Greasemonkey script or something similar? Even though Gmail doesn't use conventional links, maybe simulating clicking a specific element could do the trick.
For instance, while logged out:
<span tabindex="0" role="link" action="si" class="az9OKd">Sign into chat</span>
And while logged in, in the drop-down menu:
<div tabindex="-1" id=":1mj" role="menuitem" class="oA" value="si"><div class="uQ c6"/>Sign into chat</div>
<div tabindex="-1" id=":8f" role="menuitem" class="oA" value="sia"><div class="uQ c5"/>Sign into AIM®</div>
<div tabindex="-1" id=":8e" role="menuitem" class="oA" value="so"><div class="uQ df"/>Sign out of chat</div>
At the bottom of the page:
<span id=":im" class="l8 ou" tabindex="0" role="link">turn off chat</span>
<span id=":im" class="l8 ou" tabindex="0" role="link">turn on chat</span>
Does anyone have an idea how to trigger these actions with JavaScript even though they are not traditional links? Perhaps deciphering the meaning behind "so", "si", and "sia" could unlock the ability to directly call these functions.
If not, is there another workaround for managing chat settings based on location?