This repository was archived by the owner on Feb 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 11//Version
2- var scriptVersion = 'v0.2.5 ' ;
2+ var scriptVersion = 'v0.2.6 ' ;
33document . getElementById ( 'app-version' ) . innerHTML = scriptVersion ;
44//API url
55var apiUrl = 'https://mixer.com/api/v1/' ;
@@ -18,11 +18,17 @@ function Get(url) {
1818 var Httpreq = new XMLHttpRequest ( ) ;
1919 Httpreq . open ( "GET" , url , false ) ;
2020 Httpreq . send ( null ) ;
21- var response = JSON . parse ( Httpreq . responseText ) ;
2221 var statusCode = Httpreq . status ;
23- response . statusCode = statusCode ;
24- console . log ( response )
25- return response
22+ if ( statusCode !== 200 ) {
23+ var response = { "statusCode" : statusCode }
24+ return response
25+ }
26+ else {
27+ var response = JSON . parse ( Httpreq . responseText ) ;
28+ response . statusCode = statusCode ;
29+ console . log ( response )
30+ return response
31+ }
2632}
2733
2834//Return Lightstream status from id(aka ChannelId)
@@ -46,6 +52,7 @@ function parseXuid(channelId) {
4652 console . log ( 'Parsing Lighstream' )
4753 videoUrl = `${ apiUrl } users/${ channelId } /xuid` ;
4854 var rawData = Get ( videoUrl ) ;
55+ console . log ( rawData )
4956 if ( rawData [ 'statusCode' ] !== 200 ) { xuid = `failed ${ rawData [ 'statusCode' ] } ` ; }
5057 else {
5158 var xuid = rawData [ 'xuid' ] ;
Original file line number Diff line number Diff line change 11{
22 "name" : " catToys" ,
3- "version" : " 0.2.5 " ,
3+ "version" : " 0.2.6 " ,
44 "manifest_version" : 2 ,
55 "description" : " A tool for looking up user information on Mixer.com" ,
66 "content_scripts" : [
Original file line number Diff line number Diff line change 55*/
66body {
77 width : 225px ;
8- height : 325 px ;
8+ height : 380 px ;
99 font-family : 'Poppins' , sans-serif;
1010}
1111div {
You can’t perform that action at this time.
0 commit comments