You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/* * File Extention
|
|
|
|
================================================== */
|
|
|
|
if(typeof VMM != 'undefined' && typeof VMM.FileExtention == 'undefined') {
|
|
|
|
VMM.FileExtention = {
|
|
|
|
googleDocType: function(url) {
|
|
|
|
var fileName = url,
|
|
|
|
fileExtension = "",
|
|
|
|
validFileExtensions = ["DOC","DOCX","XLS","XLSX","PPT","PPTX","PDF","PAGES","AI","PSD","TIFF","DXF","SVG","EPS","PS","TTF","XPS","ZIP","RAR"],
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
fileExtension = fileName.substr(fileName.length - 5, 5);
|
|
|
|
|
|
|
|
for (var i = 0; i < validFileExtensions.length; i++) {
|
|
|
|
if (fileExtension.toLowerCase().match(validFileExtensions[i].toString().toLowerCase()) || fileName.match("docs.google.com") ) {
|
|
|
|
flag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return flag;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|