Hey CodingForums and coders!
I'm coding plugin for a website and websites has good APIS to example check when someone joins to chat and to send automatically message: 'Welcome' etc.
So I'm coding /update command to my 'chatbot' and was goin to use $.getScript to get newest, updated script from url and run it again / replacing old code.
So everytime when I send to chat '/update' chatbot will run function update.
What do I need to do to replace the old code with the new code?
Here's something what I tried and I think it's working, or is it?
Code:
$.getScript(url,function(){
// Sends message 'chabot is updated' and get's version from variable chatBotV!
});
Also nice add would be to check if olds code version (variable chatBotV) is same as updated, it wont replace it.
If you need more details comment below...
~Thanks, ECode