Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject HTML elements in studio page #5197

Open
smilekison opened this issue Aug 15, 2022 · 0 comments
Open

Inject HTML elements in studio page #5197

smilekison opened this issue Aug 15, 2022 · 0 comments
Labels
Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Component: Studio Type: Feature Request ✨

Comments

@smilekison
Copy link
Contributor

smilekison commented Aug 15, 2022

Describe the problem to be solved

Currently, I am trying to inject some HTML into studio 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 studio 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?

Describe the solution you would like

  1. Since I want to inject HTML in studio related pages using the plugin, a client-side hook if available would solve my issue.
  2. If possible a hook that loads on every page load will be helpful for creating client side plugin and loading the injected HTML by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Component: Studio Type: Feature Request ✨
Projects
None yet
Development

No branches or pull requests

2 participants