Thread: Modifying gadget .js help
Threaded View
-
April 4th, 2015 01:13 AM #1
- Join Date
- Apr 2015
- Location
- Urff
- Posts
- 82
- Mentioned
- 0 Post(s)
- Tagged
- 2 Thread(s)
- Sex:
Modifying gadget .js help
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.
Code:theStream[4] = "https://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] = "https://somafm.com/play/spacestation"; theType[4] = "WMP"; theStream[5] = "https://ice.somafm.com/doomed"; theLogo[5] = "Dark industrial/ambient music for tortured souls."; theXML[5] = "N"; theName[5] = "Doomed"; theWebsite[5] = "https://ice.somafm.com/doomed"; theType[5] = "WMP"; theStream[6] = "https://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] = "https://tunein.com/radio/Grateful-Dead-Radio-s54607"; theType[6] = "WMP"; theStream[7] = "https://kdhx.fm/live"; theLogo[7] = "88.1 KDHX Independent Radio St. Louis"; theXML[7] = "B"; theName[7] = "88.1 KDHX"; theWebsite[7] = "https://kdhx.fm/live"; theType[7] = "WMP";
You can open
https://tunein.com/radio/Grateful-Dead-Radio-s54607
and
https://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...
Code:// 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","https://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!Last edited by Terrapin2190; April 4th, 2015 at 01:17 AM.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Please help modifying shellstyle.dll
By sxb36 in forum Explorer and shellReplies: 4Last Post: June 26th, 2019, 12:47 AM -
Modifying shell32.dll on windows 10 - impossible?
By Ruppidx in forum Members Software DevelopementReplies: 2Last Post: August 26th, 2017, 10:37 PM -
Modifying Themes
By Thuggz Bunny in forum General DiscussionReplies: 14Last Post: August 26th, 2017, 05:09 PM -
Modifying Windows 7
By Devroul in forum General QuestionsReplies: 4Last Post: July 17th, 2012, 03:19 PM -
please help!!!!How to Save A Modifying Theme!!!
By alienfear in forum WSB ErrorsReplies: 0Last Post: April 9th, 2010, 09:20 AM
From DA: https://www.deviantart.com/niivu/art/macOS-for-Windows-11-952231551
Is there a good Mac...