Widget:ResultCounter
From Rinchen Terdzö
<script>
var results = document.getElementsByClassName("result"); for (var i = 0; i < results.length; i++) { addCounter(results.item(i)) }
function addCounter(element) { let index = element.indexOf(); let counterDiv = element.querySelectorAll(":scope > div#resultIndex"); counterDiv.innerHTML = index; }
</script>