You are here

clickFileExtension

Used by the following Containers: 
Variable Type: 
Custom Javascript
Provides the extension of the file being clicked
	function() {
// Gets the URLPath, Checks if it contains a "."
// Returns the extension of the file if found
    var urlpath = {{clickPath}};
	if (urlpath.includes(".") == 0) {
    	return undefined;
    } else {
    	var fileExtension = urlpath.substring(urlpath.lastIndexOf('.')+1);
        return fileExtension;
    }
}