Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- $("#liveNotification").ready(function () {
- var channel = "DarkBoi";
- $.getJSON("http://api.hitbox.tv/media/live/" + channel.toLowerCase(), function (data) {
- var mediaIsLive = data.livestream[0].media_is_live;
- if (mediaIsLive == 1) {
- return $("#liveNotification").text("Online");
- }
- return $("#liveNotification").text("Offline");
- }).error(function () {
- $("#liveNotification").text("I'm not sure :(");
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement