Hi,
I change name from popup.js to background.js. Effect the same, and no errors in consol :[
When I put code like this:
var clientID = 'API-key';
var baseKraken = 'https://api.twitch.tv/kraken/';
function getKrakenAPI(endpoint, data, method) {
return $.ajax({
url: baseKraken + endpoint,
method: method,
data: data,
dataType: 'json',
headers: {
'Client-ID': clientID,
Accept: 'application/vnd.twitchtv.v5+json'
}
});
}
getKrakenAPI(
'streams',
{
channel: [ 'ivelios_christopher', 'esl_sc2' ]
}
)
.done(function(data) {
if(data._total > 0) {
}
});
chrome.browserAction.setBadgeText( { text: "On" } );
The text “On” display normal. I don`t get it. In “If” not working, but solo without “If” in, working normal :[
Best,
Ivelios