Wich files do i need in my extension?

Hello :slight_smile: i recived the review result today and have to fix some stuff. I downloaded the demo project from github but there are multiple files in and i want to know which do i need and which not.

  • backend.js (obv i need this)
  • common.js
  • config.html
  • config.js
  • live_config.html
  • live_config.js
  • panel.html (obv i need this)
  • viewer.js

What an Extension ‘needs’ is entirely dependant on how you design your Extension.

At a minimum there needs to be a HTML file and a JS file for your frontend. If your Extension only has a panel, config, and live config views, then you only need files related to them. As for any backend files, well that’s up to you to host so is not part of what should be uploaded to Twitch and you can use whatever backend files you like.

Well i got only a panel and a backend. No config or anything else because this is handled from my Backend Service.

Even if you don’t need the config or live config views, I’d still suggest having some text displayed indicating that there’s no need to config the Extension there.

yeah i got something like this in.

I also got this

2.9: Your Extension includes HTML files that are not correctly loading the Twitch Extension Helper. Either it is not present, or it is not being loaded first.

Do i have to put

<script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>

just infront of all other scripts?

As well as the Extension Helper script you also need to have an onAuthorized handler, as otherwise Twitch will see it as the Extension not being loaded if there’s no handler by the time it fires the event.

yeah i got the loader in my js file. But only in the panel one. For the Config.html i dont have any js function. There is just text. It looks like this

document.getElementById("prev-page").addEventListener("click", prevPage);
document.getElementById("next-page").addEventListener("click", nextPage);

var token, userID, channelID, clientId, helixToken;
var totalPages, currentPage;

const twitch = window.Twitch.ext;

twitch.onAuthorized((auth) => {
    token = auth.token;  
    userId = auth.userId; 
    channelID = auth.channelId;
    clientId = auth.clientId;
    helixToken = auth.helixToken;

That should be enough for the Extension helper to properly load. At the end of the day, you are responsible for testing this and ensuring it all works before going to review.

i mean everything was working but in one file the jQuerry was getling loaded first. So i think this was the reason.