Buckley Air Force Base

Videos are currently unavailable, please check back later.

0) { var searchTxt = CleanUpSearchText(jQuery(“#txtDVIDSSearch”).val()); if (searchTxt !== “”) { document.location = searchURL.replace(“searchstring”, searchTxt); } else { console.log(“After scrubbing nothing to submit for search.”); return false; } } else { //document.location = baseURL; } }); jQuery(‘#txtDVIDSSearch’).keypress(function (e) { if (e.which === 13) {//Enter key pressed e.preventDefault(); jQuery(‘#btnDVIDSSearch’).click();//Trigger search button click event } }); if (clearSearch !== null) { clearSearch.on(“click”, function () { document.location = baseURL; }); } }); // Whitelist regex the text to ensure only expected characters are used. // Then encode spaces and single quotes function CleanUpSearchText(theText) { //DVIDS Search API expected characters, allow dash, word chars, single quote, and space. //Remove the rest //encode the single quotes and spaces to not break the js call to GetCCURL() return theText.replace(/[^/-w’ ]/gi, ”).replace(/’/g, “\'”).replace(‘ ‘, ‘%20’).replace(///ig, ‘%2F’); } function GetCCURL(URL) { var CCString = “dvpcc=” + dvpCCEnabled; if (URL.indexOf(“dvpcc”) > 0) { //document.location.href = URL; document.location.href = URL.replace(/(dvpcc=)[^&#]+/, ‘$1’ + dvpCCEnabled); } else { if (URL.indexOf(“?”) > 0) { CCString = “&” + CCString; } else { CCString = “?” + CCString; } if (URL.indexOf(“#DVIDSVideoPlayer” > 0)) { document.location.href = URL.substring(0, URL.indexOf(‘#DVIDSVideoPlayer’)) + CCString + URL.substring(URL.indexOf(‘#DVIDSVideoPlayer’)); } else { document.location.href = URL + CCString; } } } ]]>

Source