Terrapin2190
April 4th, 2015, 01:13 AM
Okay... so I really like the Airlock Blue HUD gadgets. But most of the internet radio stations in the javascript file aren't working. I'm attempting to add my own personalized list of stations to the stations.js file in 'shell:gadgets \Airlock Blue Computer Status.gadget\js'. I've figured out how to add different stations from soma.fm using the input from soma radio stations within stations.js, but adding from other websites, I've been having some trouble.
Here are some sample scripts. The soma.fm scripts are working.
theStream[4] = "http://ice.somafm.com/spacestation";
theLogo[4] = "Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica.";
theXML[4] = "N";
theName[4] = "Space Station Soma";
theWebsite[4] = "http://somafm.com/play/spacestation";
theType[4] = "WMP";
theStream[5] = "http://ice.somafm.com/doomed";
theLogo[5] = "Dark industrial/ambient music for tortured souls.";
theXML[5] = "N";
theName[5] = "Doomed";
theWebsite[5] = "http://ice.somafm.com/doomed";
theType[5] = "WMP";
theStream[6] = "http://stream.radiotime.com/listen.stream?streamIds=677379";
theLogo[6] = "Enjoy streaming Grateful Dead, Jerry Garcia Band, Phil and Friends, Ratdog and other bands.";
theXML[6] = "B";
theName[6] = "Grateful Dead Radio";
theWebsite[6] = "http://tunein.com/radio/Grateful-Dead-Radio-s54607";
theType[6] = "WMP";
theStream[7] = "http://kdhx.fm/live";
theLogo[7] = "88.1 KDHX Independent Radio St. Louis";
theXML[7] = "B";
theName[7] = "88.1 KDHX";
theWebsite[7] = "http://kdhx.fm/live";
theType[7] = "WMP";
I've opened javascript info from a few different live radio players and found a lot of different entries regarding where the player is pointing to, but I'm confused on what 'theXML' means and how 'theStream' and 'theWebsite' differs and how to know which is which in javascript info.
You can open
http://tunein.com/radio/Grateful-Dead-Radio-s54607
and
http://kdhx.fm/live
right-click and select 'view page source' to view the javascript info.
(I'm using Cyberfox, not sure if it's accessible in other web browsers or not)
Also, with the Airlock Blue Computer Status gadget, it won't display my WiFi signal strength. It does display the router name and a check mark on top of it, but the meter is stuck at 0%. I haven't peeked into the .js yet to see what's in there.
(Nevermind, I just took a better look at it and it's my battery showing 0%. Which, my battery has been toast for years now. I just use it to elevate my laptop hahaha!)
My bad.
On a side note, I'd also like the gadget to remember what radio station I chose upon rebooting my PC. I'm guessing it has to do with the 'settings.js'
Here's the script on that, which is small but looks confusing to me haha...
// loadSettings - first method called when Settings page loads
///////////////////////////////////////////////////////////////////////////////////////////////////
function loadSettings() {
System.Gadget.onSettingsClosing = procSettingsClosingEvent; // set settings page closing event
if (System.Gadget.Settings.read("radioURL") == ""){System.Gadget.Settings.write("radioURL","http://www.977music.com/tunein/web/hitz.asx")}
stationPicker.value = System.Gadget.Settings.read("radioURL");
}
///////////////////////////////////////////////////////////////////////////////////////////////////
function procSettingsClosingEvent(event){
// process settings page closing event
if (event.closeAction == event.Action.commit) {
// save settings
System.Gadget.Settings.write("radioURL", stationPicker.value);
}
event.cancel = false;
}
Thanks so much in advance for anyone willing to help. I'm learning!
Here are some sample scripts. The soma.fm scripts are working.
theStream[4] = "http://ice.somafm.com/spacestation";
theLogo[4] = "Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica.";
theXML[4] = "N";
theName[4] = "Space Station Soma";
theWebsite[4] = "http://somafm.com/play/spacestation";
theType[4] = "WMP";
theStream[5] = "http://ice.somafm.com/doomed";
theLogo[5] = "Dark industrial/ambient music for tortured souls.";
theXML[5] = "N";
theName[5] = "Doomed";
theWebsite[5] = "http://ice.somafm.com/doomed";
theType[5] = "WMP";
theStream[6] = "http://stream.radiotime.com/listen.stream?streamIds=677379";
theLogo[6] = "Enjoy streaming Grateful Dead, Jerry Garcia Band, Phil and Friends, Ratdog and other bands.";
theXML[6] = "B";
theName[6] = "Grateful Dead Radio";
theWebsite[6] = "http://tunein.com/radio/Grateful-Dead-Radio-s54607";
theType[6] = "WMP";
theStream[7] = "http://kdhx.fm/live";
theLogo[7] = "88.1 KDHX Independent Radio St. Louis";
theXML[7] = "B";
theName[7] = "88.1 KDHX";
theWebsite[7] = "http://kdhx.fm/live";
theType[7] = "WMP";
I've opened javascript info from a few different live radio players and found a lot of different entries regarding where the player is pointing to, but I'm confused on what 'theXML' means and how 'theStream' and 'theWebsite' differs and how to know which is which in javascript info.
You can open
http://tunein.com/radio/Grateful-Dead-Radio-s54607
and
http://kdhx.fm/live
right-click and select 'view page source' to view the javascript info.
(I'm using Cyberfox, not sure if it's accessible in other web browsers or not)
Also, with the Airlock Blue Computer Status gadget, it won't display my WiFi signal strength. It does display the router name and a check mark on top of it, but the meter is stuck at 0%. I haven't peeked into the .js yet to see what's in there.
(Nevermind, I just took a better look at it and it's my battery showing 0%. Which, my battery has been toast for years now. I just use it to elevate my laptop hahaha!)
My bad.
On a side note, I'd also like the gadget to remember what radio station I chose upon rebooting my PC. I'm guessing it has to do with the 'settings.js'
Here's the script on that, which is small but looks confusing to me haha...
// loadSettings - first method called when Settings page loads
///////////////////////////////////////////////////////////////////////////////////////////////////
function loadSettings() {
System.Gadget.onSettingsClosing = procSettingsClosingEvent; // set settings page closing event
if (System.Gadget.Settings.read("radioURL") == ""){System.Gadget.Settings.write("radioURL","http://www.977music.com/tunein/web/hitz.asx")}
stationPicker.value = System.Gadget.Settings.read("radioURL");
}
///////////////////////////////////////////////////////////////////////////////////////////////////
function procSettingsClosingEvent(event){
// process settings page closing event
if (event.closeAction == event.Action.commit) {
// save settings
System.Gadget.Settings.write("radioURL", stationPicker.value);
}
event.cancel = false;
}
Thanks so much in advance for anyone willing to help. I'm learning!