Skip to content

Commit

Permalink
Slight changes
Browse files Browse the repository at this point in the history
  • Loading branch information
d8ahazard committed Dec 13, 2016
1 parent 3671c27 commit 1218b3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ function viewChangelog() {
});
$('#refreshUpdate').click(function(){
refreshBranches();
updateBox(true);
});


Expand Down Expand Up @@ -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'));
Expand All @@ -351,9 +352,9 @@ function updateBox() {
if (difference > 0) {

if (!getCookie('updateDismiss')) {
$('#updateContainer').html("<button type=\"button\" id=\"updateDismiss\" class=\"close pull-right\">&times;</button>" +
$('#updateContainer').html("<button type='button' id='updateDismiss' class='close pull-right'>&times;</button>" +
"<span>You are currently <strong>" + difference + "</strong> "+ ((difference > 1) ? 'commits' : 'commit')+" behind!<br/>" +
"See <a href=\"" + compareURL + "\" target=\"_blank\">changelog</a> or <div id='downloadModal'><code>click here</code></div> to install now.</span>");
"See <a href='" + compareURL + "' target='_blank'>changelog</a> or <div id='downloadModal'><code>click here</code></div> to install now.</span>");
$('#updateContainer').fadeIn("slow");
$('#downloadModal').click(function(){
downloadUpdate(json[0].sha);
Expand Down
6 changes: 5 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
});
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1218b3c

Please sign in to comment.