Skip to content

Commit

Permalink
Updated Link Flags to support file names with periods in them.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmbacon committed Aug 19, 2015
1 parent ee90ba6 commit 85eed85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $('<span class="flag">')
//console.log('match!')
ext = lastExploded[1]
ext = lastValue
//console.log('ext:'+ext)
flag.append('.'+ext)
}
Expand Down

0 comments on commit 85eed85

Please sign in to comment.