# 플러그인이나 테마 컴포넌트 시스템을 통해 헬퍼의 함수를 수정할 수 있을까요?

**URL:** https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964
**Category:** Development
**Created:** [2월 7, 2020, 8:09오전 UTC](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964 "2020-02-07T08:09:35Z")
**Posts on this page:** 1
**Showing post:** 21

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [9월 28, 2020, 10:18오후 UTC](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964/21 "2020-09-28T22:18:51Z")

</div>

페이지 로드 사이에 표시되는 스피너의 HTML을 변경하려는 경우라면

`discourse\helpers\loading-spinner.js`

은 아마도 당신이 찾고 있는 것이 아닐 것입니다. 이 헬퍼는 작성기(composer)와 검색 메뉴 등에서 보이는 작은 스피너를 생성합니다… 등.

페이지 로딩 중에 표시되는 메인 스피너를 변경하려는 경우라면 이 파일을 찾아보아야 합니다.

[discourse/app/assets/javascripts/discourse/app/templates/components/conditional-loading-spinner.hbs at 7a2e8d3ead63c7d99e1069fc7823e933f931ba85 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/7a2e8d3ead63c7d99e1069fc7823e933f931ba85/app/assets/javascripts/discourse/app/templates/components/conditional-loading-spinner.hbs)

해당 스피너의 템플릿은 다음과 같이 오버라이드할 수 있습니다.

```markdown
<script type="text/x-handlebars" data-template-name="components/conditional-loading-spinner">
{{#if condition}}
  <!-- 커스텀 스피너용 HTML을 여기에 넣으세요 -->
{{else}}
  {{yield}}
{{/if}}
</script>

```

이를 테마/테마 컴포넌트의 `</head>` 탭에 추가한 후, 커스텀 스피너에 필요한 CSS를 추가하면 됩니다.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964)._
