Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
I have started to work on Greasemonkey scripts and was just starting to wonder how you go about updating yours Chris?

I see in the codes that you do an XML request to an external PHP page, but, what's the code in that page and does it automatically download the update or what? :-/


Thanks Chris! :)


Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Trade secrets are not released. =x

I decided using AJAX was the best way to get the data to check for updates. Thus, as you said, I send an XHR to the server with the current version. The server script then compares the script version with the current, and returns either true or false. (Entry a false version for an example.) The script then redirects to the same page which contains a redirect function to the actual topic on SZ. :P

Frankly, it's easier to say that I'm willing to put any codes submitted to SZ into the update function.

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
nevah... my codes! :P

Thanks for the insight though Chris! :)

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
No problem. If you need more help, just post back. :)

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
short of giving me your code... there's nothing that I need help with! :)

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Bug testing? :P

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
pssh I has loads of buggers around already! :P

newBookmarkLockedFalling