Can I get a page type somehow to know if it’s a post page or not? I’m currenly checking if there is a posts-wrapper class cause it’s seems unique for posts, but I’m sure it’s not the best way.
<script type="text/discourse-plugin" version="0.8">
api.onPageChange(() => {
$(document).ready(() => {
if ($(".posts-wrapper").length) {
//run script if it is a post
}
});
});
</script>