Registration is disabled!

How to work with XenInfo widgets on the computer

Anything that you can not find on the repo

Moderator: King_o_Hill

Post Reply
User avatar
rasputin007
Posts: 52
Joined: Mon Sep 28, 2015 6:27 pm

How to work with XenInfo widgets on the computer

Post by rasputin007 » Thu Mar 14, 2019 8:52 pm

As nice as XenInfo is, it can be a nightmare to edit and test XenInfo-widgets on the computer as you have no data from XenInfo (or better the weather.framework).
But now you can!
I have created a template.js file that holds mock data for all available data you can get from XenInfo.
In order to do that you need to make 3 changes and reverse them when you want to run on iPhone/iPad.

1.) you need to add/remove a link to the template.js file, this is done with a new line like
Image
Best placed at the top, so it can be read before the rest of javascript is loaded.

2.) you need to remove/add the "type" from the function mainUpdate(type) so it looks like function mainUpdate().

3.) you need to add/remove an onLoad="mainUpdate()" to the body tag so it looks like

Code: Select all

<body onLoad="mainUpdate()">
Now your XenInfo-widget should display data when opened with a browser on your computer.
Due to the nature of the mainUpdate(type) function working, you only can have one type displayed at any time. For that you have to change the

Code: Select all

var type ="weather";// either "statusbar", "battery","reminders","alarms","events","music","weather","system" or "siginginfo"
in the template.js
Well, there is a way to display all type's at ones, but that involves much more changes, but I am leaving this out for the time being.
There is no data supplied for "signinginfo"!

Download
Nothing is impossible, only miracles take a bit longer!

Post Reply