# Custom JavaScript in UI

**URL:** https://community.zammad.org/t/custom-javascript-in-ui/1867
**Category:** Technical assistance
**Created:** [December 31, 2018, 10:15am UTC](https://community.zammad.org/t/custom-javascript-in-ui/1867 "2018-12-31T10:15:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jampy](https://community.zammad.org/user_avatar/community.zammad.org/jampy/32/826_2.png) [@jampy](https://community.zammad.org/u/jampy)
#### Post date: [December 31, 2018, 10:15am UTC](https://community.zammad.org/t/custom-javascript-in-ui/1867/1 "2018-12-31T10:15:05Z")

</div>

Is there a elegant way to add a custom tag to the Zammad UI?

I’d like to add custom functionality but don’t want to mess with the Zammad source code itself. A simple Tag in the header allowing me to run API requests and show IFRAMEs would be all I need.

Is there such a configuration?

---

<div class="post-metadata">

### Author: ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)
#### Post date: [January 2, 2019, 11:31am UTC](https://community.zammad.org/t/custom-javascript-in-ui/1867/3 "2019-01-02T11:31:22Z")

</div>

That’s not possible without changing Zammads source code, I’m sorry.

(Edit: Unless you want to do some dirty stuff with rewrite rules and use your own js that also contains zammads js but again, that’s a maximum pervy dose )

---

<div class="post-metadata">

### Author: ![jampy](https://community.zammad.org/user_avatar/community.zammad.org/jampy/32/826_2.png) [@jampy](https://community.zammad.org/u/jampy)
#### Post date: [January 2, 2019, 1:00pm UTC](https://community.zammad.org/t/custom-javascript-in-ui/1867/4 "2019-01-02T13:00:26Z")

</div>

Since I’m using (currently testing) my own installation - what would be the “best” way to alter the source code so that my tag gets served along with the UI?

---

<div class="post-metadata">

### Author: ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)
#### Post date: [January 3, 2019, 9:23am UTC](https://community.zammad.org/t/custom-javascript-in-ui/1867/5 "2019-01-03T09:23:38Z")

</div>

You can find the important stuff relevant to youi in

`/opt/zammad/app/assets/javascripts/` the `application.js` is Zammads javascript file.

After changing the file, you need to tell Zammad the changes by:

```auto
systemctl stop zammad
zammad run rails assets:precompile
systemctl start zammad

```

Changes should take affect then.

If needed, you can remove your current javascript compiles to ensure zammad really writes them: `rm /opt/zammad/public/assets/*.js*`

---

<div class="post-metadata">

### Author: ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)
#### Post date: [February 21, 2020, 2:15am UTC](https://community.zammad.org/t/custom-javascript-in-ui/1867/6 "2020-02-21T02:15:07Z")

</div>

This topic was automatically closed after 416 days. New replies are no longer allowed.
