Кнопки Онлайн-Оффлайн

Код:
<div id="html-footer" class="section">
	<div class="container"><!--онлайни офлайн с возможн. закрывания начало-->
<script type="text/javascript"> var L0='<img class="imgON_Off" src="';
var L1='" style="cursor:pointer;cursor:hand;width:153;margin-top:3px;" />'; //153 - размер картинки по горизонтали
var ImgON="https://i5.imageban.ru/out/2020/11/24/c4480bc310c97c7080ebca4891947b47.gif";
var ImgOff="https://i3.imageban.ru/out/2020/11/24/18ff342f835874498a4b6b261d821dbe.gif"; 
$("#pun-viewtopic .post .post-author ul").each(function (){
$(this).html('<div class=UL>'+$(this).html()+'</div>');
if ($(this).find(".pa-online").html()!=null){$(this).append(L0+ImgON+L1)
    }else $(this).append(L0+ImgOff+L1);
$(this).find(".pa-author,.pa-title,.pa-avatar").insertBefore($(this).find("div.UL"));});
$("div.UL").hide();
$("ul .imgON_Off").click(function () {
$(this).parent("ul").find(".UL").toggle('slow');});
</script>
<!--онлайни офлайн с возможн. закрывания конец-->

Пример - здесь.