Hi, I have tested this code in a config.html file, and it doesn’t execute any code in “configureExtension”
// all extension need onAuthorized
window.Twitch.ext.onAuthorized(auth => {
});
// onChanged will recieve the configuration
// but only when first called/extension is loaded
window.Twitch.ext.configuration.onChanged(() => {
var global_config = window.Twitch.ext.configuration.global;
if (global_config) {
try {
global_config.content = JSON.parse(global_config.content);
configureExtension(global_config.content);
} catch (e) {
// this accounts for JSON parse errors
// just in case
}
}
});
// central function to accept the config from whichever source
function configureExtension(the_config) {
// do whatever you want with your config
// (re)build the extension
}
// central function to accept the config from whichever source
function configureExtension(the_config) {
document.getElementById(“idelement”).value=“test OK!!!”;
}
and never execute this code