Add Custom Widget to Wiki and SubWiki

We’re trying to get a widget to our Wikis that will allow users to submit a help ticket.
We can manually add it to each page (simple javascript/html code), but having a widget or extension (something similar to the Back to Top extension) that we could have it automatically applied would be great.
The functionality is similar to the “New Topic” on this forum.

Widget
image

Back to Top
image

Looks like what you need is javascript extension with “Always on this wiki”. This will automatically inject a javascript script on all the pages of the wiki.

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/SkinExtensionsTutorial/.

An alternative would be a simple help panel that you add to the list of right or left panel in the wiki configuration (but it won’t exactly look like you screenshot of course).

Thanks, @tmortagne for the quick response.
I added the javascript, but it doesn’t seem to do anything.
If you have an additional moment, can you see if there something wrong with the format of the code or formatting/parsing we’re using?

Code:
image

Object:
image

Not really the right guys to help with javascript but I would start by making sure the script is actually loaded. Can you find it in the html head when you load a new page ?

Ha wait what is in your screanshot is not javascript. This is HTML which contains javascript.

If your script depends on some other script you might want to use require.js which is available by default on XWiki (we actually use it in most of our js).

We ended-up adding our code to the Presentation section of the Wiki Administration and it’s working now.
Thanks for your help, @tmortagne!