# Using a theme component instead of an iframe to create a topic timer

**URL:** https://meta.discourse.org/t/using-a-theme-component-instead-of-an-iframe-to-create-a-topic-timer/189635
**Category:** Development
**Tags:** topic-timers
**Created:** [March 18, 2018, 11:49pm UTC](https://meta.discourse.org/t/using-a-theme-component-instead-of-an-iframe-to-create-a-topic-timer/189635 "2018-03-18T23:49:17Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [March 27, 2018, 7:42am UTC](https://meta.discourse.org/t/using-a-theme-component-instead-of-an-iframe-to-create-a-topic-timer/189635/8 "2018-03-27T07:42:04Z")

</div>

Alright, the theme component has been released! Please let me know if you find any issues with it or have any ideas on how it could be improved.

> [@Topic Stopwatch](https://meta.discourse.org/t/topic-stopwatch-theme-component/83939):
>
> Installing this theme component will add a stopwatch to the top of a topic. A tag specified in the theme settings will establish which topics the stopwatch will appear. Example: Settings There are three settings. You must add a single tag name to associate with a stopwatch. In this example I use a tag called “speed-read.” Installation IMPORTANT: You must be running [Discourse Version 2.0.0.beta4](https://meta.discourse.org/t/discourse-2-0-0-beta4-release-notes/82446) or later for this theme component to work. Import Links: http…

Also, for anyone interested in solving the original question on how to disable iframe scrolling, simply add this code to the `</head>` tab of a theme of your choice:

```plaintext
<script type="text/discourse-plugin" version="0.8.18">
   api.decorateCooked($elem => $elem.children('iframe').attr("scrolling", "no"));
</script> 

```

(Shout-out to @vinothkannans for bringing to light the [usefulness](https://meta.discourse.org/t/how-do-you-force-a-script-to-refire-on-every-page-load-in-discourse/74856/26) of `decorateCooked()` 😀)

---

_[View the full topic](https://meta.discourse.org/t/using-a-theme-component-instead-of-an-iframe-to-create-a-topic-timer/189635)._
