# Javascript in theme component only runs once?

**URL:** <https://meta.discourse.org/t/javascript-in-theme-component-only-runs-once/106202>\
**Category:** Product Support\
**Created:** [January 10, 2019, 3:52pm UTC](https://meta.discourse.org/t/javascript-in-theme-component-only-runs-once/106202 "2019-01-10T15:52:05Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [January 10, 2019, 6:42pm UTC](https://meta.discourse.org/t/javascript-in-theme-component-only-runs-once/106202/6 "2019-01-10T18:42:30Z")

</div>

That means the script isn’t available. This isn’t really a Discourse question, but:

```plaintext
<script src="https://api.reftagger.com/v2/RefTagger.js"></script>

<script type="text/discourse-plugin" version="0.2">
  api.decorateCooked($elem => {
    refTagger.tag($elem[0]);
  });
</script>

```

should work.

---

_[View the full topic](https://meta.discourse.org/t/javascript-in-theme-component-only-runs-once/106202)._
