페이지 유형으로 해당 페이지가 게시물 페이지인지 아닌지를 확인할 수 있는 방법이 있을까요? 현재는 게시물에만 고유하게 적용되는 posts-wrapper 클래스가 있는지 확인하고 있지만, 이것이 최선의 방법은 아니라고 생각합니다.
<script type="text/discourse-plugin" version="0.8"> api.onPageChange(() => { $(document).ready(() => { if ($(".posts-wrapper").length) { //run script if it is a post } }); }); </script>