Results 1 to 3 of 3
Thread: Modifying gadget .js help
Hybrid 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.
-
April 5th, 2015 09:55 AM #2
- Join Date
- Apr 2015
- Location
- Urff
- Posts
- 82
- Mentioned
- 0 Post(s)
- Tagged
- 2 Thread(s)
- Sex:
Alright! UPDATE!! I haven't found out how to add my 2 favorite local radio stations (one recently moved, updated their website, and seems to strictly use a flash player so it's hard to get a lock on their stream... the other can't afford to stream online from their website... Bummer.), BUT I have figured out how to add some radio stations! Usually all you need is an M3U link. I'm not sure yet is .pls or other formats work yet.
EDIT: .pls didn't work for me, but it could have been a bad link. As far as I can tell, most Windows Media Player and Winamp links work. That includes .m3u, .asx, and possibly .wax.
Here's how it's done. First, as an example, go to this website:
https://www.internet-radio.com/stations/soul/page2
(Yeah, I love me some good old funky soul tunes haha)
All you need to do is copy the link from the M3U button and paste it in the 'stations.js' file between the quotation marks after 'theStream' and 'theWebsite'
I'll upload a modified stations.js file later if anyone wants to use it. Perhaps, with Pats permission (and if I can figure out how to modify the gadget installers themselves) I'll be able to upload an updated version of Airlock Blue gadgets. With updated radio stations for the Computer Status gadget and 12-hour time for the clock widget. Also working with JMB to add AM/PM markers.
April 6th, 2015 02:52 AM #3
- Join Date
- Apr 2015
- Location
- Urff
- Posts
- 82
- Mentioned
- 0 Post(s)
- Tagged
- 2 Thread(s)
- Sex:
Booted my PC and the Computer Status Widget was still on the last station I was listening to. I guess it only resets under special circumstances, closing sidebar.exe or the widget itself. Problem solved! Without having to look into it haha. Big thanks to Pats again for these nice looking gadgets
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
Welcome. I will let the veterans of the forum answer your question as they have the authority. From my perspective, I came here looking for answers on how to tweak a theme to my liking and this...
Hello world, I am...