From c383b67d905c09847a67f7eb3c004863f928a552 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 26 Jun 2016 14:07:52 -0400 Subject: [PATCH] Skip version checks if on dev branch --- js/pihole/footer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/pihole/footer.js b/js/pihole/footer.js index a449be0b..b6e55a85 100644 --- a/js/pihole/footer.js +++ b/js/pihole/footer.js @@ -33,7 +33,8 @@ function versionCompare(left, right) { // Update check $.getJSON("https://api.github.com/repos/pi-hole/pi-hole/releases/latest", function(json) { - if(versionCompare(piholeVersion, json.tag_name.slice(1)) < 0) { + // Skip if on dev + if(piholeVersion !== "vDev" && versionCompare(piholeVersion, json.tag_name.slice(1)) < 0) { // Alert user $("#alPiholeUpdate").show(); if(!$("#dropdown-menu").hasClass("open")) { @@ -42,7 +43,8 @@ $.getJSON("https://api.github.com/repos/pi-hole/pi-hole/releases/latest", functi } }); $.getJSON("https://api.github.com/repos/pi-hole/AdminLTE/releases/latest", function(json) { - if(versionCompare(webVersion, json.tag_name.slice(1)) < 0) { + // Skip if on dev + if(webVersion !== "vDev" && versionCompare(webVersion, json.tag_name.slice(1)) < 0) { // Alert user $("#alWebUpdate").show(); if(!$("#dropdown-menu").hasClass("open")) { @@ -53,7 +55,7 @@ $.getJSON("https://api.github.com/repos/pi-hole/AdminLTE/releases/latest", funct /* * Make sure that Pi-hole is updated to at least v2.7, since that is needed to use the sudo - * features of the interface + * features of the interface. Skip if on dev */ -if(versionCompare(piholeVersion, "v2.7") < 0) +if(piholeVersion !== "vDev" && versionCompare(piholeVersion, "v2.7") < 0) alert("Pi-hole needs to be updated to at least v2.7 before you can use features such as whitelisting/blacklisting from this web interface!")