Instead, can you make this:

```
var isListening = getListeningForDocument(contentDocument);
```

And implement `getListeningForDocument` next to where you declare `alreadyListeningTo` and `reactTopListenersCounter`.