Jump to content
Dante Unbound: Share Bug Reports and Feedback Here! ×

Alert Desktop Gadget


Spirit_of_Night
 Share

Recommended Posts

this : http://warframe.deathwishgame.co.uk/alerts.json is the page that the desktop gadget loads. Its even more tidy than xml (though it probably has a few extras lying about) The problem with anything like xml is you can't call them using javascript, because of cross site scripting restrictions. The only way (that i'm aware of) that you can load remote data with javascript, is a JSONP request.

 

If I were using PHP as the backend, it would be so much easier, which is why a lot of the other sites can do it faster, and easier, but this is a desktop app, so it has to serve data slightly differenlty.

 

The only issue is the sheer number of people connecting. I'm honestly happy its this popular. My brother has spotted me the money to run the server, and if I can use it to further my skills, and get myself a job to pay for the site, thats excellent, but for now, I'm not only using the VPS i've gotten to get the gadget running smoothly, I'm also testing out new web coding techniques that I couldn't use on the old host.

 

The chat interface on the left of the website you download the gadget from is one such example. It uses long-polling for instant-update chat, without any more work than simple javascript from the client.

Link to comment
Share on other sites

ah ofcourse, sorry i completely forgot about the cross-domain protection. probably because i hate it so much, if you dont want to use your server yahoo has a service called yql which can convert the xml to other formats, here is an example:

 

http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20xml%20WHERE%20url%3D%22http%3A%2F%2Fcontent.playwarframe.com%2Falerts.xml%22&format=jsonp

 

I will make a jsfiddle tonight for an example (also just because I am interested now)

 

EDIT: http://jsfiddle.net/ESd53/3/

Edited again, fixed cased sensitivity of filter

 

YQL uses ip based authentication which is nice as there is no api key requirement, and its running from an enterprise server obviously.

The limitations average is something like one call per ip per 2.75 seconds so there is no worries of a widget ever exceeding it.

 

Just an idea for stability and reducing overheads

Edited by DrugsForChildren
Link to comment
Share on other sites

I've installed it, and when I go to gadgets (right click, gadgets) does not appears, any idea?

Curious. Have you tried re-downloading the file (it is quite large). The .gadget file is effectively a zip file so it is possible it will be able to attempt to install with a corrupt download.

 

 

This is strange, I have this on right now, and it's saying there's a Nano Spores alert on Neso, Neptune with 21m remaining, but there actually is no alert there.

My gadget pulls directly from their twitter feed, so if it lists, but is not on the actual game, then it is more than likely a problem with their twitter feed.

 

Remember that you cannot see alerts in a system that you have not fully explored (completed every planet at least once).

Link to comment
Share on other sites

Exactly.

 

Over the next few days, I'll separate out the various bits of code into several different downloadable gadgets. If you wouldn't mind giving me a hand in figuring out what part of it is causing the issues. Once I've gotten them split up, If you could download and install each, and see what works.

 

If you could, this would be a great help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...