# Il codice JS smette di funzionare quando la pagina viene aggiornata

**URL:** https://meta.discourse.org/t/the-js-code-stops-working-when-the-page-is-refreshed/306317
**Category:** Development
**Created:** [1 Maggio 2024, 12:39pm UTC](https://meta.discourse.org/t/the-js-code-stops-working-when-the-page-is-refreshed/306317 "2024-05-01T12:39:19Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [1 Maggio 2024, 2:17pm UTC](https://meta.discourse.org/t/the-js-code-stops-working-when-the-page-is-refreshed/306317/6 "2024-05-01T14:17:15Z")

</div>

Penso che tu voglia qualcosa del genere:

1. Sposta i tag usando la presa del plugin `topic-list-before-status`.

```html
<script type="text/x-handlebars" data-template-name="/connectors/topic-list-before-status/tag.raw">
  {{discourse-tags context.topic mode="list" tagsForUser=context.tagsForUser}}
</script>

```

1. Usa il CSS per nascondere il tag originale e stilizzarli (potrebbe essere necessario regolarlo)

```css
.link-bottom-line .discourse-tags {
    display: none;
}

.link-top-line .discourse-tags {
    column-gap: 5px;
    vertical-align: text-top;
    
    .discourse-tag {
        font-size: var(--font-down-2);
        border-radius: 7px;
        padding: 2px 8px;
        background-color: #1f1f33;
    }

    .discourse-tag::after {
        content: '' !important;
        margin: none !important;
    }
}

```

---

_[View the full topic](https://meta.discourse.org/t/the-js-code-stops-working-when-the-page-is-refreshed/306317)._
