Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% if request.session.character_access.CharacterSheet %}
- <script>
- $(function(){
- var refresher = function () {
- $.getJSON( "{% url 'characters:sheet_json' %}", function(obj) {
- refresh_timer = obj.refresh_timer * 1000;
- setTimeout(refresher, refresh_timer);
- if (obj.content) {
- // do shit with content and data
- $("#Content").replaceWith("Jeej we got api data:D");
- //content will be a dict that you will use like this
- // obj.content.balance = wallet balance
- // obj.content.location = last known character location
- // obj.content.charactername = charactername
- // for corp in obj.content.employment_history
- // corp.name =
- // etc
- }
- });
- };
- setTimeout(refresher, 300); // 0.3 seconds
- });
- </script>
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment