Scholar.MIME = new function(){ this.isExternalTextExtension = isExternalTextExtension; this.sniffForMIMEType = sniffForMIMEType; this.sniffForBinary = sniffForBinary; this.getMIMETypeFromData = getMIMETypeFromData; this.getMIMETypeFromFile = getMIMETypeFromFile; this.hasInternalHandler = hasInternalHandler; this.fileHasInternalHandler = fileHasInternalHandler; // Magic numbers var _snifferEntries = [ ["%PDF-", "application/pdf"], ["%!PS-Adobe-", 'application/postscript'], ["%! PS-Adobe-", 'application/postscript'], ["From", 'text/plain'], [">From", 'text/plain'], ["#!", 'text/plain'], [" 31 || (9 <= chr && chr <=13 ) || chr == 27; } }