diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index a09f77c..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Firebottle
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/mixer-lookup/css/main.css b/css/main.css
similarity index 95%
rename from mixer-lookup/css/main.css
rename to css/main.css
index 4082519..c00b19d 100644
--- a/mixer-lookup/css/main.css
+++ b/css/main.css
@@ -1,221 +1,221 @@
-body {
- background-color: #0b1122;
- font-family: 'Roboto Condensed', sans-serif;
- color: white;
- margin: 0px;
- padding: 0px;
-}
-.hidden{
- display:none;
-}
-a, a:active, a:visited, a:link{
- font-family: 'Roboto Condensed', sans-serif;
- color: white;
- text-decoration: none;
-}
-a:hover{
- color: #cecece;
-}
-.topbuttons{
- min-height:20px;
- padding-right:10px;
-}
-.topbuttons a{
- margin-left:15px;
- float:right;
-}
-h1 {
- margin: 5px 0px 5px 0px;
- padding: 0px;
-}
-p{
- padding:0px;
- margin:0px;
-}
-span{
- display:block;
-}
-input {
- display: block;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #fff;
- background-color: rgba(255, 255, 255, 0.03);
- background-image: none;
- border: 1px solid rgba(255, 255, 255, 0.25);
- border-radius: 0;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -o-box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, 0.075) 1px 2px rgba(0, 0, 0, 0.2);
- box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, 0.075) 1px 2px rgba(0, 0, 0, 0.2);
- -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- -webkit-transition: all border-color ease-in-out .15s, box-shadow ease-in-out .15s ease;
- transition: all border-color ease-in-out .15s, box-shadow ease-in-out .15s ease;
-}
-.top{
- color: white;
- padding: 5px 5px 5px 10px;
- background-image:url('../images/top-bg.jpg');
- border-bottom: 1px solid #2871ff;
-}
-.input:focus {
- border-color: #38acf1;
- outline: 0;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(56, 172, 241, 0.6);
- -o-box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(56, 172, 241, 0.6) 1px 2px rgba(0, 0, 0, 0.2);
- box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(56, 172, 241, 0.6) 1px 2px rgba(0, 0, 0, 0.2);
-}
-.top button,
-.settings button,
-.removeChannel,
-.stopwatching {
- margin: 3px auto;
- display: block;
- text-align: center;
- color: #fff;
- border-radius: 4em;
- background: rgba(62, 73, 90, 0.75);
- text-shadow: 0 0 1px rgba(20, 24, 30, 0.95);
- letter-spacing: 1px;
- border: 1px solid transparent;
- -webkit-transition: all 0.2s ease;
- transition: all 0.2s ease;
- font-weight: regular;
- position: relative;
- outline: 0 !important;
- -webkit-transform: translateZ(0px);
- transform: translateZ(0px);
- box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
- text-transform: uppercase;
- cursor: pointer;
-}
-.top button:hover,
-.settings button:hover,
-.removeChannel:hover,
-.stopwatching:hover
- {
- outline: 0 !important;
- color: #ffffff;
- border-color: transparent;
- background: rgba(83, 97, 120, 0.75);
- box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.5), inset 0px 0px 3px rgba(255, 255, 255, 0.05);
-}
-.settings button {
- margin: 0px;
-}
-.top button:focus,
-.settings button:focus,
-.removeChannel:focus,
-.stopwatching:focus
-{
- -webkit-transform: translate3d(0, 1.5px, 0);
- transform: translate3d(0, 1.5px, 0);
-}
-.btnwrap{
- display:flex;
- margin-top:10px;
-}
-.lookup-info{
- width:80%;
- margin:auto;
-}
-.label{
- font-size: 1.1em;
-}
-.left{
- margin:0% 1% 0% 0%;
- padding: 0% 1% 0% 0%;
- border-right: 1px solid #cecece;
-}
-.user-main .left{
- width:20%;
-}
-.user-main .right{
- width:80%;
-}
-.channel-main .left{
- width:33%;
-}
-.channel-main .right{
- width:70%;
-}
-.info{
- margin-bottom:2%;
-}
-.info .value{
- color:gray;
-}
-.info-link{
- margin-bottom:1%;
-}
-.top-slider{
- text-align:center;
-}
-.uihide{
- background-color:#1f2c4f;
- color:white;
- border:1px solid #2871ff;
- border-radius: 0px 0px 5px 5px;
- padding:5px 20px 5px 20px;
- cursor: pointer;
- margin-top:-1px;
-}
-
-
-/*** USER AREA ***/
-.user-main, .channel-main{
- display:flex;
- margin-bottom:2%;
- padding:2%;
- background-color:white;
- border:1px solid #2871ff;
- color:#0b1122;
- -webkit-box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.75);
- -moz-box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.75);
- box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.75);
-}
-.user-name .info, .channel-name .info, .username{
- margin:0;
-}
-.uUsername, .cToken{
- font-size:1.25em;
-}
-.uAvatarURL, .cThumbURL{
- min-width:100%;
-}
-.cThumbURL img{
- width:100%;
-}
-
-.uAvatarURL img{
- width:100%;
- max-width:256px;
-}
-.uSocial{
- text-align:center;
-}
-.uSocial .fa{
- font-size:2em;
- color: #0b1122;
-}
-.uSocial a{
- display:none;
-}
-
-/*** Channel Area ***/
-.cOnline{
- font-size:1.75em;
-}
-.cOnline.online{
- color:green;
-}
-.cOnline.offline{
- color:red;
-}
-.cLink{
- margin-bottom: 3%;
-}
-.cLink a, .cLink a:active, .cLink a:visited, .cLink a:hover{
- color:#0b1122;
+body {
+ background-color: #0b1122;
+ font-family: 'Roboto Condensed', sans-serif;
+ color: white;
+ margin: 0px;
+ padding: 0px;
+}
+.hidden{
+ display:none;
+}
+a, a:active, a:visited, a:link{
+ font-family: 'Roboto Condensed', sans-serif;
+ color: white;
+ text-decoration: none;
+}
+a:hover{
+ color: #cecece;
+}
+.topbuttons{
+ min-height:20px;
+ padding-right:10px;
+}
+.topbuttons a{
+ margin-left:15px;
+ float:right;
+}
+h1 {
+ margin: 5px 0px 5px 0px;
+ padding: 0px;
+}
+p{
+ padding:0px;
+ margin:0px;
+}
+span{
+ display:block;
+}
+input {
+ display: block;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #fff;
+ background-color: rgba(255, 255, 255, 0.03);
+ background-image: none;
+ border: 1px solid rgba(255, 255, 255, 0.25);
+ border-radius: 0;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -o-box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, 0.075) 1px 2px rgba(0, 0, 0, 0.2);
+ box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, 0.075) 1px 2px rgba(0, 0, 0, 0.2);
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ -webkit-transition: all border-color ease-in-out .15s, box-shadow ease-in-out .15s ease;
+ transition: all border-color ease-in-out .15s, box-shadow ease-in-out .15s ease;
+}
+.top{
+ color: white;
+ padding: 5px 5px 5px 10px;
+ background-image:url('../images/top-bg.jpg');
+ border-bottom: 1px solid #2871ff;
+}
+.input:focus {
+ border-color: #38acf1;
+ outline: 0;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(56, 172, 241, 0.6);
+ -o-box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(56, 172, 241, 0.6) 1px 2px rgba(0, 0, 0, 0.2);
+ box-shadow: '' inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(56, 172, 241, 0.6) 1px 2px rgba(0, 0, 0, 0.2);
+}
+.top button,
+.settings button,
+.removeChannel,
+.stopwatching {
+ margin: 3px auto;
+ display: block;
+ text-align: center;
+ color: #fff;
+ border-radius: 4em;
+ background: rgba(62, 73, 90, 0.75);
+ text-shadow: 0 0 1px rgba(20, 24, 30, 0.95);
+ letter-spacing: 1px;
+ border: 1px solid transparent;
+ -webkit-transition: all 0.2s ease;
+ transition: all 0.2s ease;
+ font-weight: regular;
+ position: relative;
+ outline: 0 !important;
+ -webkit-transform: translateZ(0px);
+ transform: translateZ(0px);
+ box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
+ text-transform: uppercase;
+ cursor: pointer;
+}
+.top button:hover,
+.settings button:hover,
+.removeChannel:hover,
+.stopwatching:hover
+ {
+ outline: 0 !important;
+ color: #ffffff;
+ border-color: transparent;
+ background: rgba(83, 97, 120, 0.75);
+ box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.5), inset 0px 0px 3px rgba(255, 255, 255, 0.05);
+}
+.settings button {
+ margin: 0px;
+}
+.top button:focus,
+.settings button:focus,
+.removeChannel:focus,
+.stopwatching:focus
+{
+ -webkit-transform: translate3d(0, 1.5px, 0);
+ transform: translate3d(0, 1.5px, 0);
+}
+.btnwrap{
+ display:flex;
+ margin-top:10px;
+}
+.lookup-info{
+ width:80%;
+ margin:auto;
+}
+.label{
+ font-size: 1.1em;
+}
+.left{
+ margin:0% 1% 0% 0%;
+ padding: 0% 1% 0% 0%;
+ border-right: 1px solid #cecece;
+}
+.user-main .left{
+ width:20%;
+}
+.user-main .right{
+ width:80%;
+}
+.channel-main .left{
+ width:33%;
+}
+.channel-main .right{
+ width:70%;
+}
+.info{
+ margin-bottom:2%;
+}
+.info .value{
+ color:gray;
+}
+.info-link{
+ margin-bottom:1%;
+}
+.top-slider{
+ text-align:center;
+}
+.uihide{
+ background-color:#1f2c4f;
+ color:white;
+ border:1px solid #2871ff;
+ border-radius: 0px 0px 5px 5px;
+ padding:5px 20px 5px 20px;
+ cursor: pointer;
+ margin-top:-1px;
+}
+
+
+/*** USER AREA ***/
+.user-main, .channel-main{
+ display:flex;
+ margin-bottom:2%;
+ padding:2%;
+ background-color:white;
+ border:1px solid #2871ff;
+ color:#0b1122;
+ -webkit-box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.75);
+ -moz-box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.75);
+ box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.75);
+}
+.user-name .info, .channel-name .info, .username{
+ margin:0;
+}
+.uUsername, .cToken{
+ font-size:1.25em;
+}
+.uAvatarURL, .cThumbURL{
+ min-width:100%;
+}
+.cThumbURL img{
+ width:100%;
+}
+
+.uAvatarURL img{
+ width:100%;
+ max-width:256px;
+}
+.uSocial{
+ text-align:center;
+}
+.uSocial .fa{
+ font-size:2em;
+ color: #0b1122;
+}
+.uSocial a{
+ display:none;
+}
+
+/*** Channel Area ***/
+.cOnline{
+ font-size:1.75em;
+}
+.cOnline.online{
+ color:green;
+}
+.cOnline.offline{
+ color:red;
+}
+.cLink{
+ margin-bottom: 3%;
+}
+.cLink a, .cLink a:active, .cLink a:visited, .cLink a:hover{
+ color:#0b1122;
}
\ No newline at end of file
diff --git a/mixer-lookup/favicon.ico b/favicon.ico
similarity index 100%
rename from mixer-lookup/favicon.ico
rename to favicon.ico
diff --git a/mixer-lookup/images/no-image-channel.jpg b/images/no-image-channel.jpg
similarity index 100%
rename from mixer-lookup/images/no-image-channel.jpg
rename to images/no-image-channel.jpg
diff --git a/mixer-lookup/images/no-image.jpg b/images/no-image.jpg
similarity index 100%
rename from mixer-lookup/images/no-image.jpg
rename to images/no-image.jpg
diff --git a/mixer-lookup/images/top-bg.jpg b/images/top-bg.jpg
similarity index 100%
rename from mixer-lookup/images/top-bg.jpg
rename to images/top-bg.jpg
diff --git a/mixer-lookup/index.html b/index.html
similarity index 97%
rename from mixer-lookup/index.html
rename to index.html
index 355d406..ab13531 100644
--- a/mixer-lookup/index.html
+++ b/index.html
@@ -1,263 +1,263 @@
-
-
-
-
-
-
-
- User Lookup Mixer.com - Firebottle.tv
-
-
-
-
-
-
-
-
-
-
-
-
-
Mixer.com User Lookup
-
-
- Type in a Mixer.com username to look up user information. You'll be given user data available via the Mixer.com API. This will also generate a direct link to your profile as well as a version without the top UI for profile page use.
-
-
-
-
- Show/Hide Top
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Channel Profile
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Game Description Source
-
-
-
-
-
-
-
-
-
-
-
Description Creation Date
-
-
-
-
Description Updated Date
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ User Lookup Mixer.com - Firebottle.tv
+
+
+
+
+
+
+
+
+
+
+
+
+
Mixer.com User Lookup
+
+
+ Type in a Mixer.com username to look up user information. You'll be given user data available via the Mixer.com API. This will also generate a direct link to your profile as well as a version without the top UI for profile page use.
+
+
+
+
+ Show/Hide Top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Channel Profile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Game Description Source
+
+
+
+
+
+
+
+
+
+
+
Description Creation Date
+
+
+
+
Description Updated Date
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mixer-lookup/js/main.js b/js/main.js
similarity index 97%
rename from mixer-lookup/js/main.js
rename to js/main.js
index 6767313..7993241 100644
--- a/mixer-lookup/js/main.js
+++ b/js/main.js
@@ -1,265 +1,265 @@
-// Lookup channel and parse data into variables
-function channelLookup(username){
- // Reset Fields
- $('.info p').not('.uAvatarURL, .cThumbURL, .label, .uSocial').empty();
- $('.cOnline').removeClass('offline, online');
- $('.twitter').hide().attr("href",'');
- $('.youtube').hide().attr("href",'');
- $('.playerme').hide().attr("href",'');
- $('.lookup-info').removeClass('hidden');
-
- $.getJSON("https://Mixer.com/api/v1/channels/" + username, function(data) {
-
- // User Info
- var uUserID = data.user.id;
- var uUsername = data.user.username;
- var uVerified = data.user.verified;
- var uSocial = data.user.social;
- var uExperience = data.user.experience;
- var uSparks = data.user.sparks;
- var uAvatarURL = data.user.avatarUrl;
- var uLevel = data.user.level;
- var uBio = data.user.bio;
- var uCreation = data.user.createdAt;
- var uUpdated = data.user.updatedAt;
- var uGroups = data.user.groups;
-
- // Channel Info
- var cID = data.id;
- var cToken = data.token;
- var cOnline = data.online;
- var cFeatured = data.featured;
- var cPartnered = data.partnered;
- var cTranscode = data.transcodingEnabled;
- var cSuspended = data.suspended;
- var cName = data.name;
- var cAudience = data.audience;
- var cViewersTotal = data.viewersTotal;
- var cViewersCurrent = data.viewersCurrent;
- var cNumFollowers = data.numFollowers;
- var cInteractive = data.interactive;
- var cTetrisGameId = data.tetrisGameId;
- var cFTL = data.ftl;
- var cDescriptionCreation = data.createdAt;
- var cDescriptionUpdated = data.updatedAt;
-
- if(data.thumbnail !== null){
- var cThumbURL = data.thumbnail.url;
- var cThumbCreation = data.thumbnail.createdAt;
- var cThumbUpdated = data.thumbnail.updatedAt;
- }
-
- if(data.type !== null){
- var cGameName = data.type.name;
- var cGameDescription = data.type.description;
- var cGameDescriptionSource = data.type.source;
- }
-
- var cShareText = data.preferences.sharetext;
- var cFollowMessage = data.preferences['channel:notify:followmessage'];
- var cSubscriberMessage = data.preferences['channel:notify:subscribemessage'];
- var cSubscriberMail = data.preferences['channel:partner:submail'];
- var cTweetText = data.preferences['channel:tweet:body'];
-
- // Convert to Human
- if(cOnline === false){
- var cOnline = 'offline';
- $('.cOnline').addClass('offline');
- }else{
- var cOnline = 'online';
- $('.cOnline').addClass('online');
- }
-
- if(cSuspended === false){
- var cSuspended = 'no';
- }else{
- var cSuspended = 'yes';
- }
-
- if(cInteractive === false){
- var cInteractive = 'Not interactive.';
- }else{
- var cInteractive = 'Interactive is on.';
- }
-
- if(cFeatured === false){
- var cFeatured = 'no';
- }else{
- var cFeatured = 'yes';
- }
-
- if(cPartnered === false){
- var cPartnered = 'no';
- }else{
- var cPartnered = 'yes';
- }
-
- if(cGameDescription == ""){
- var cGameDescription = "Description not available."
- }
-
- if(cFTL === -1){
- var cFTL = "FTL not active."
- } else{
- var cFTL = "FTL is active."
- }
-
- if(cTranscode === true){
- var cTranscode = "Transcoding is on."
- } else{
- var cTranscode = "Transcoding is off."
- }
-
- if (cGameName === undefined || cGameName === null){
- var cGameName = "No Game Set."
- }
-
-
- // Throw vars into fields for styling.
- $('.uUsername').text(uUsername+" - #"+uUserID);
- $('.uVerified').text(uVerified);
-
- $.each(uSocial, function(k,v){
- if(k == "twitter"){
- $('.twitter').show().attr("href",v);
- }else if(k == "youtube"){
- $('.youtube').show().attr("href",v);
- }else if(k == "player"){
- $('.playerme').show().attr("href",v);
- }
- })
-
- $('.uExperience').text(uExperience);
- $('.uSparks').text(uSparks);
- $('.uAvatarURL img').attr('src',uAvatarURL);
- $('.uBio').text(uBio);
- $('.uCreation').text(uCreation);
- $('.uUpdated').text(uUpdated);
-
- var newHTML = [];
- for (var i = 0; i < uGroups.length; i++) {
- newHTML.push(''+uGroups[i].name+' ');
- }
- $('.uGroups').html(newHTML.join(""));
-
- $('.cToken').text(cToken+' - #'+cID);
- $('.cOnline').text(cOnline);
- $('.cFeatured').text(cFeatured);
- $('.cPartnered').text(cPartnered);
- $('.cTranscode').text(cTranscode);
- $('.cSuspended').text(cSuspended);
- $('.cName').text(cName);
- $('.cAudience').text(cAudience);
- $('.cViewersTotal').text(cViewersTotal);
- $('.cViewersCurrent').text(cViewersCurrent);
- $('.cNumFollowers').text(cNumFollowers);
- $('.uLevel').text(uLevel);
- $('.cInteractive').text(cInteractive);
- $('.cTetrisGameId').text(cTetrisGameId);
- $('.cFTL').text(cFTL);
- $('.cDescriptionCreation').text(cDescriptionCreation);
- $('.cDescriptionUpdated').text(cDescriptionUpdated);
- $('.cThumbURL img').attr('src',cThumbURL);
- $('.cThumbCreation').text(cThumbCreation);
- $('.cThumbUpdated').text(cThumbUpdated);
- $('.cGameName').text(cGameName);
- $('.cGameDescription').text(cGameDescription);
- $('.cGameDescriptionSource').text(cGameDescriptionSource);
- $('.cShareText').text(cShareText);
- $('.cTweetText').text(cTweetText);
- $('.cFollowMessage').text(cFollowMessage);
- $('.cSubscriberMessage').text(cSubscriberMessage);
- $('.cSubscriberMail').text(cSubscriberMail);
-
- // Pull list of hosters
- hosters(cID);
-
- $('.cLink').html('Go To Channel > '); })
-
- var trimmedUsername = username.trim();
- // throw in profile links
- $('.links .direct .link').html('http://www.firebottle.tv/projects/Mixer-lookup?username='+trimmedUsername+' ');
- $('.links .clean .link').html('http://www.firebottle.tv/projects/Mixer-lookup?username='+trimmedUsername+'&clean=yes ');
- $('.links').show();
-
-}
-
-//Find Hosters
-function hosters(cID){
- $.getJSON("https://Mixer.com/api/v1/channels/" + cID + "/hosters", function(data) {
- if(data.length){
- var i;
- for (i = 0; i < data.length; ++i) {
- var streamer = data[i].token;
- var viewers = data[i].viewersCurrent;
- $('.cHosted').append(''+streamer+' ('+viewers+') ');
- }
- } else {
- $('.cHosted').append('None ');
- }
- });
-}
-
-// Function to grab URL parameters
-var getUrlParameter = function getUrlParameter(sParam) {
- var sPageURL = decodeURIComponent(window.location.search.substring(1)),
- sURLVariables = sPageURL.split('&'),
- sParameterName,
- i;
-
- for (i = 0; i < sURLVariables.length; i++) {
- sParameterName = sURLVariables[i].split('=');
-
- if (sParameterName[0] === sParam) {
- return sParameterName[1] === undefined ? true : sParameterName[1];
- }
- }
-};
-// Grab the parameters we need.
-var username = getUrlParameter('username');
-var cleanUI = getUrlParameter('clean');
-
-// Check parameters and render something that won't break the page.
-if (username != '' && username != null && username != undefined && cleanUI != 'yes'){
- channelLookup(username);
-} else if ( username != '' && username != null && username != undefined && cleanUI == 'yes'){
- channelLookup(username);
- $('.top, .links').hide();
-} else if ( username != '' || username === null || username === undefined && cleanUI == 'yes'){
- console.log('Defaulting to regular page layout.')
-}
-
-// Set initial show hide button text
-function uiHider(){
- var visible = $('.top').is(':visible');
- if( visible == true){
- $('.uihide').text('Hide UI');
- } else {
- $('.uihide').text('Show UI');
- }
-}
-
-// Things to run on page load.
-$( document ).ready(function() {
- uiHider();
-
- // Add Username
- $('.streamerinputaddbtn').click(function() {
- var username = $('.streamerinputadd').val();
- channelLookup(username);
- });
-
- // UI Hider
- $('.uihide').click(function() {
- $('.top').slideToggle();
- var btnText = $('.uihide').text();
- if (btnText == 'Hide UI'){
- $('.uihide').text('Show UI');
- }else{
- $('.uihide').text('Hide UI');
- }
- });
-});
-
-
-
+// Lookup channel and parse data into variables
+function channelLookup(username){
+ // Reset Fields
+ $('.info p').not('.uAvatarURL, .cThumbURL, .label, .uSocial').empty();
+ $('.cOnline').removeClass('offline, online');
+ $('.twitter').hide().attr("href",'');
+ $('.youtube').hide().attr("href",'');
+ $('.playerme').hide().attr("href",'');
+ $('.lookup-info').removeClass('hidden');
+
+ $.getJSON("https://Mixer.com/api/v1/channels/" + username, function(data) {
+
+ // User Info
+ var uUserID = data.user.id;
+ var uUsername = data.user.username;
+ var uVerified = data.user.verified;
+ var uSocial = data.user.social;
+ var uExperience = data.user.experience;
+ var uSparks = data.user.sparks;
+ var uAvatarURL = data.user.avatarUrl;
+ var uLevel = data.user.level;
+ var uBio = data.user.bio;
+ var uCreation = data.user.createdAt;
+ var uUpdated = data.user.updatedAt;
+ var uGroups = data.user.groups;
+
+ // Channel Info
+ var cID = data.id;
+ var cToken = data.token;
+ var cOnline = data.online;
+ var cFeatured = data.featured;
+ var cPartnered = data.partnered;
+ var cTranscode = data.transcodingEnabled;
+ var cSuspended = data.suspended;
+ var cName = data.name;
+ var cAudience = data.audience;
+ var cViewersTotal = data.viewersTotal;
+ var cViewersCurrent = data.viewersCurrent;
+ var cNumFollowers = data.numFollowers;
+ var cInteractive = data.interactive;
+ var cTetrisGameId = data.tetrisGameId;
+ var cFTL = data.ftl;
+ var cDescriptionCreation = data.createdAt;
+ var cDescriptionUpdated = data.updatedAt;
+
+ if(data.thumbnail !== null){
+ var cThumbURL = data.thumbnail.url;
+ var cThumbCreation = data.thumbnail.createdAt;
+ var cThumbUpdated = data.thumbnail.updatedAt;
+ }
+
+ if(data.type !== null){
+ var cGameName = data.type.name;
+ var cGameDescription = data.type.description;
+ var cGameDescriptionSource = data.type.source;
+ }
+
+ var cShareText = data.preferences.sharetext;
+ var cFollowMessage = data.preferences['channel:notify:followmessage'];
+ var cSubscriberMessage = data.preferences['channel:notify:subscribemessage'];
+ var cSubscriberMail = data.preferences['channel:partner:submail'];
+ var cTweetText = data.preferences['channel:tweet:body'];
+
+ // Convert to Human
+ if(cOnline === false){
+ var cOnline = 'offline';
+ $('.cOnline').addClass('offline');
+ }else{
+ var cOnline = 'online';
+ $('.cOnline').addClass('online');
+ }
+
+ if(cSuspended === false){
+ var cSuspended = 'no';
+ }else{
+ var cSuspended = 'yes';
+ }
+
+ if(cInteractive === false){
+ var cInteractive = 'Not interactive.';
+ }else{
+ var cInteractive = 'Interactive is on.';
+ }
+
+ if(cFeatured === false){
+ var cFeatured = 'no';
+ }else{
+ var cFeatured = 'yes';
+ }
+
+ if(cPartnered === false){
+ var cPartnered = 'no';
+ }else{
+ var cPartnered = 'yes';
+ }
+
+ if(cGameDescription == ""){
+ var cGameDescription = "Description not available."
+ }
+
+ if(cFTL === -1){
+ var cFTL = "FTL not active."
+ } else{
+ var cFTL = "FTL is active."
+ }
+
+ if(cTranscode === true){
+ var cTranscode = "Transcoding is on."
+ } else{
+ var cTranscode = "Transcoding is off."
+ }
+
+ if (cGameName === undefined || cGameName === null){
+ var cGameName = "No Game Set."
+ }
+
+
+ // Throw vars into fields for styling.
+ $('.uUsername').text(uUsername+" - #"+uUserID);
+ $('.uVerified').text(uVerified);
+
+ $.each(uSocial, function(k,v){
+ if(k == "twitter"){
+ $('.twitter').show().attr("href",v);
+ }else if(k == "youtube"){
+ $('.youtube').show().attr("href",v);
+ }else if(k == "player"){
+ $('.playerme').show().attr("href",v);
+ }
+ })
+
+ $('.uExperience').text(uExperience);
+ $('.uSparks').text(uSparks);
+ $('.uAvatarURL img').attr('src',uAvatarURL);
+ $('.uBio').text(uBio);
+ $('.uCreation').text(uCreation);
+ $('.uUpdated').text(uUpdated);
+
+ var newHTML = [];
+ for (var i = 0; i < uGroups.length; i++) {
+ newHTML.push(''+uGroups[i].name+' ');
+ }
+ $('.uGroups').html(newHTML.join(""));
+
+ $('.cToken').text(cToken+' - #'+cID);
+ $('.cOnline').text(cOnline);
+ $('.cFeatured').text(cFeatured);
+ $('.cPartnered').text(cPartnered);
+ $('.cTranscode').text(cTranscode);
+ $('.cSuspended').text(cSuspended);
+ $('.cName').text(cName);
+ $('.cAudience').text(cAudience);
+ $('.cViewersTotal').text(cViewersTotal);
+ $('.cViewersCurrent').text(cViewersCurrent);
+ $('.cNumFollowers').text(cNumFollowers);
+ $('.uLevel').text(uLevel);
+ $('.cInteractive').text(cInteractive);
+ $('.cTetrisGameId').text(cTetrisGameId);
+ $('.cFTL').text(cFTL);
+ $('.cDescriptionCreation').text(cDescriptionCreation);
+ $('.cDescriptionUpdated').text(cDescriptionUpdated);
+ $('.cThumbURL img').attr('src',cThumbURL);
+ $('.cThumbCreation').text(cThumbCreation);
+ $('.cThumbUpdated').text(cThumbUpdated);
+ $('.cGameName').text(cGameName);
+ $('.cGameDescription').text(cGameDescription);
+ $('.cGameDescriptionSource').text(cGameDescriptionSource);
+ $('.cShareText').text(cShareText);
+ $('.cTweetText').text(cTweetText);
+ $('.cFollowMessage').text(cFollowMessage);
+ $('.cSubscriberMessage').text(cSubscriberMessage);
+ $('.cSubscriberMail').text(cSubscriberMail);
+
+ // Pull list of hosters
+ hosters(cID);
+
+ $('.cLink').html('Go To Channel > '); })
+
+ var trimmedUsername = username.trim();
+ // throw in profile links
+ $('.links .direct .link').html('http://www.firebottle.tv/projects/Mixer-lookup?username='+trimmedUsername+' ');
+ $('.links .clean .link').html('http://www.firebottle.tv/projects/Mixer-lookup?username='+trimmedUsername+'&clean=yes ');
+ $('.links').show();
+
+}
+
+//Find Hosters
+function hosters(cID){
+ $.getJSON("https://Mixer.com/api/v1/channels/" + cID + "/hosters", function(data) {
+ if(data.length){
+ var i;
+ for (i = 0; i < data.length; ++i) {
+ var streamer = data[i].token;
+ var viewers = data[i].viewersCurrent;
+ $('.cHosted').append(''+streamer+' ('+viewers+') ');
+ }
+ } else {
+ $('.cHosted').append('None ');
+ }
+ });
+}
+
+// Function to grab URL parameters
+var getUrlParameter = function getUrlParameter(sParam) {
+ var sPageURL = decodeURIComponent(window.location.search.substring(1)),
+ sURLVariables = sPageURL.split('&'),
+ sParameterName,
+ i;
+
+ for (i = 0; i < sURLVariables.length; i++) {
+ sParameterName = sURLVariables[i].split('=');
+
+ if (sParameterName[0] === sParam) {
+ return sParameterName[1] === undefined ? true : sParameterName[1];
+ }
+ }
+};
+// Grab the parameters we need.
+var username = getUrlParameter('username');
+var cleanUI = getUrlParameter('clean');
+
+// Check parameters and render something that won't break the page.
+if (username != '' && username != null && username != undefined && cleanUI != 'yes'){
+ channelLookup(username);
+} else if ( username != '' && username != null && username != undefined && cleanUI == 'yes'){
+ channelLookup(username);
+ $('.top, .links').hide();
+} else if ( username != '' || username === null || username === undefined && cleanUI == 'yes'){
+ console.log('Defaulting to regular page layout.')
+}
+
+// Set initial show hide button text
+function uiHider(){
+ var visible = $('.top').is(':visible');
+ if( visible == true){
+ $('.uihide').text('Hide UI');
+ } else {
+ $('.uihide').text('Show UI');
+ }
+}
+
+// Things to run on page load.
+$( document ).ready(function() {
+ uiHider();
+
+ // Add Username
+ $('.streamerinputaddbtn').click(function() {
+ var username = $('.streamerinputadd').val();
+ channelLookup(username);
+ });
+
+ // UI Hider
+ $('.uihide').click(function() {
+ $('.top').slideToggle();
+ var btnText = $('.uihide').text();
+ if (btnText == 'Hide UI'){
+ $('.uihide').text('Show UI');
+ }else{
+ $('.uihide').text('Hide UI');
+ }
+ });
+});
+
+
+
diff --git a/mixer-lookup/README.md b/mixer-lookup/README.md
deleted file mode 100644
index 5627679..0000000
--- a/mixer-lookup/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# **Mixer Lookup for Mixer.com** #
-
-**Description:**
-Mixer Lookup is a tool that allows you to look up API information on any Mixer.com user, including account creation date, online status, and other information.
-
-**Setup:**
-This entire project is a stand alone webpage that can be run from your desktop. You can download all of the files by [clicking here.](https://github.com/Firebottle/Mixer-lookup/archive/master.zip) Once downloaded you can simply open up the HTML in the folder using google chrome. Alternatively you can use the [Mixer lookup website](http://www.firebottle.tv/projects/Mixer-lookup) and always have the newest version.
-
-**Download:**
-You can download all of the files by [clicking here.](https://github.com/Firebottle/Mixer-lookup/archive/master.zip)
-
-**Devs:**
-If you're a dev, feel free to take the code and modify it as you wish. I would appreciate you referencing the original project if you make use of any of this, but it is not required.