Huh.
The "safety text" is something you can call up by clicking on the little ? we insert at the right end of the blue bar above various maps. There is a list of "locations" in RequestEditorKit.maps that defines the URLs whose blue bars get annotated like that. They are all "containers" that contain adventure locations in them.
Go to the Nearby Plains, for example. If you do not have chat open, when you click on the ?, it will use the chat pane to display "safety details". Your cursor turns into a black circle with a ? in it when it is hovering over an adventurable location in the map. Click on it and it overlays the chat pane with the "safety text" - the "location details" that you can see in the GUI, with combat rate, water level, the list of monsters and their drops, and so on.
You can dismiss the "safety text" by clicking on the "x" in the upper right corner of it. The chat pane goes back to being the Announcements, and so on. Unfortunately, the cursor will still be the "help" cursor when you hover over an adventure location, even though clicking there will now actually adventure. I'd call that a bug.
That's all done via code in basics.js using "attachSafetyText".
"updateSafetyText" is also in basics.js. The code that you pointed out is our annotation to charpane.php to call that Javascript function whenever the charpane loads. Looking at that function, it calls /KoLmafia/updateLocation. That is handled in RelayRequest. It calls RelayRequest.handleSafety, which builds the HTML with all the location details.
I do not understand why it calls this on a charpane refresh. When you are simply looking at locations, the charpane does not refresh. Ah - but if you buff up in the GUI, or something, and click "refresh" in the charpane, some of the details in the "safety text" can change - adjusted item drop rates, they chance that particular monsters can hit you, etc.
OK. This is a big complicated feature that I never, ever use. But, I'd prefer not to hobble that last part - charpane refresh forces an update - by removing the call to updateSafety on charpane load. I guess I just need to figure out why it disables the rollover counter.
Thanks for the lead, Bale. It was very helpful!