Inject HTML elements in channel pages (create/update/detail)?

Hello everyone,
Currently, I am trying to inject some HTML into create/update channel & channel detail page. I was able to inject the HTML using the plugin.

To inject the HTML elements I have used document.onreadystatechange event (Fires when the state of the object has changed) event of DOM in create channel page. I am using this event because I cannot append elements before the DOM loads and this event is fired when DOM has completed loading.
The drawback of using this event is the injected elements load only once. If we came to that path from other paths the elements do not get injected and in order to inject them, we have to refresh the page.

Is there a way to inject HTML in desired pages or do I need to use any hooks to inject HTML?

Hi,

You can request plugin hooks on Issues · Chocobozzz/PeerTube · GitHub :slight_smile:

And if you don’t want to wait the new hooks implementation, you can try with the action:router.navigation-end hook.

@JohnLivingston
I used that hook but I faced the same problem.

ok, good to know.