In Salesforce Live Agent, I have built a custom chat page so I can display the number of customers in the queue that are ahead of the current user while they are waiting for an agent to pick up the chat. I have successfully used the code "Number of chats ahead of you in the Queue: " in my chat page to display the number of users ahead of the current user.
But when there are no users in the queue, I need to HIDE the text that says "Number of chats ahead of you in the Queue:" because it no longer applies to the user, and also because when there are no users in the queue, the clientChatQueuePosition is BLANK, and does not display a zero.
I see an answer from Peter Thorbjørnsen that suggests using "span.liveAgentQueuePosition:empty::before { content: '1'; }" (Custom Chat Window Queue Position Conditional Message), but I do not know how to implement that (I have extremely limited html/css/javascript skills).
Can anyone tell me how to use Peter's code in a custom Visualforce page? Or tell me how to show a zero when the clientChatQueuePosition has no number?