mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
add twitch-ext configuration test
This commit is contained in:
parent
80b5ecb082
commit
4853a9065b
@ -36,6 +36,28 @@ window.Twitch.ext.actions.minimize();
|
||||
window.Twitch.ext.actions.followChannel("hearthsim");
|
||||
window.Twitch.ext.actions.requestIdShare();
|
||||
|
||||
// Twitch Extension Configuration
|
||||
window.Twitch.ext.configuration.onChanged(() => {
|
||||
console.log('Configuration changed');
|
||||
if (window.Twitch.ext.configuration.broadcaster) {
|
||||
console.log('Caster configuration');
|
||||
console.log('version: ', window.Twitch.ext.configuration.broadcaster.version);
|
||||
console.log('content: ', window.Twitch.ext.configuration.broadcaster.content);
|
||||
}
|
||||
if (window.Twitch.ext.configuration.developer) {
|
||||
console.log('Developer configuration');
|
||||
console.log('version:', window.Twitch.ext.configuration.developer.version);
|
||||
console.log('content: ', window.Twitch.ext.configuration.developer.content);
|
||||
}
|
||||
if (window.Twitch.ext.configuration.global) {
|
||||
console.log('Global configuration');
|
||||
console.log('version: ', window.Twitch.ext.configuration.global.version);
|
||||
console.log('content: ', window.Twitch.ext.configuration.global.content);
|
||||
}
|
||||
});
|
||||
|
||||
window.Twitch.ext.configuration.set('broadcaster', '0.0.1', '{"test": "test"}');
|
||||
|
||||
// Twitch Extension Feature flags
|
||||
window.Twitch.ext.features.onChanged(changed => {
|
||||
if (changed.indexOf("isChatEnabled") !== -1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user