From 85eed854f6c06083c3e4b29d81e295eef40925e6 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 19 Aug 2015 14:28:19 -0400 Subject: [PATCH] Updated Link Flags to support file names with periods in them. --- js/cs.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/cs.js b/js/cs.js index 52966ba..e927916 100644 --- a/js/cs.js +++ b/js/cs.js @@ -30,19 +30,19 @@ jQuery(document).ready(function($) { base = hrefExploded[2] - //console.log('checking to see if it might be a file...') last = hrefExploded[hrefExploded.length-1] || '' var lastExploded = last.split('.') - - if (lastExploded[1]){ + var lastValue = lastExploded[lastExploded.length-1] + + if (lastValue){ //console.log('ok, so there was a dot in the last value of the url.') $.each(extensions, function(index, value){ - if (value == lastExploded[1]){ + if (value == lastValue){ flag = $('') //console.log('match!') - ext = lastExploded[1] + ext = lastValue //console.log('ext:'+ext) flag.append('.'+ext) }