Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,7 @@ var comfyJS = {
},
GetChannelRewards: async function( clientId, manageableOnly = false ) {
if( channelPassword ) {
channelPassword = channelPassword.replace( "oauth:", "" );
if( !channelInfo ) {
let info = await fetch( `https://api.twitch.tv/helix/users?login=${mainChannel}`, {
headers: {
Expand All @@ -1368,6 +1369,7 @@ var comfyJS = {
},
CreateChannelReward: async function( clientId, rewardInfo ) {
if( channelPassword ) {
channelPassword = channelPassword.replace( "oauth:", "" );
if( !channelInfo ) {
let info = await fetch( `https://api.twitch.tv/helix/users?login=${mainChannel}`, {
headers: {
Expand All @@ -1394,6 +1396,7 @@ var comfyJS = {
},
UpdateChannelReward: async function( clientId, rewardId, rewardInfo ) {
if( channelPassword ) {
channelPassword = channelPassword.replace( "oauth:", "" );
if( !channelInfo ) {
let info = await fetch( `https://api.twitch.tv/helix/users?login=${mainChannel}`, {
headers: {
Expand All @@ -1420,6 +1423,7 @@ var comfyJS = {
},
DeleteChannelReward: async function( clientId, rewardId ) {
if( channelPassword ) {
channelPassword = channelPassword.replace( "oauth:", "" );
if( !channelInfo ) {
let info = await fetch( `https://api.twitch.tv/helix/users?login=${mainChannel}`, {
headers: {
Expand Down
2 changes: 1 addition & 1 deletion examples/twitchdemo.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/comfy.min.js"></script>
<script src="../dist/comfy.js"></script>
</head>
<body>
<h1 id="math"></h1>
Expand Down