From 1218b3c7ca5ac4a4df7b0b257659120c73a995fc Mon Sep 17 00:00:00 2001 From: d8ahazard Date: Tue, 13 Dec 2016 07:34:47 -0600 Subject: [PATCH] Slight changes --- js/functions.js | 9 +++++---- js/main.js | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/js/functions.js b/js/functions.js index b75aeab..782e128 100644 --- a/js/functions.js +++ b/js/functions.js @@ -242,6 +242,7 @@ function viewChangelog() { }); $('#refreshUpdate').click(function(){ refreshBranches(); + updateBox(true); }); @@ -332,8 +333,8 @@ function setTitle(title) { $(document).attr("title", title + " - " + $('#maintitle').attr('data')); } // Idea and implementation graciously borrowed from PlexPy (https://github.com/drzoidberg33/plexpy) -function updateBox() { - if (!sessionStorage.getItem('JSONData')) { +function updateBox($force) { + if ((!sessionStorage.getItem('JSONData')) || ($force === true)) { updateJson(); } json = JSON.parse(sessionStorage.getItem('JSONData')); @@ -351,9 +352,9 @@ function updateBox() { if (difference > 0) { if (!getCookie('updateDismiss')) { - $('#updateContainer').html("" + + $('#updateContainer').html("" + "You are currently " + difference + " "+ ((difference > 1) ? 'commits' : 'commit')+" behind!
" + - "See changelog or
click here
to install now.
"); + "See changelog or
click here
to install now."); $('#updateContainer').fadeIn("slow"); $('#downloadModal').click(function(){ downloadUpdate(json[0].sha); diff --git a/js/main.js b/js/main.js index f7b2e1b..4b45de3 100644 --- a/js/main.js +++ b/js/main.js @@ -90,6 +90,10 @@ jQuery(document).ready(function($) { } } $('#reload').on('click', function() { + $('.fa-refresh').addClass('fa-spin'); + setTimeout(function() { + $('.fa-refresh').removeClass('fa-spin'); + }, 3900); var selectedFrame = $('.cd-tabs-content').find('.selected').children('iframe'); selectedFrame.attr('src', selectedFrame.attr('src')); }); @@ -186,7 +190,7 @@ jQuery(document).ready(function($) { window $(window).load(function() { if ($('#popupdate').attr('data') == 'true') { - var updateCheck = setInterval(updateBox(), 1000 * 60 * 10); + var updateCheck = setInterval(updateBox(false), 1000 * 60 * 10); } }); // Close modal on escape key