added appcache and woff properties

This commit is contained in:
coderaiser 2013-02-08 05:49:45 -05:00
parent 32574cdef9
commit fa80e54503
3 changed files with 17 additions and 9 deletions

View file

@ -4,6 +4,7 @@
".ai": "application/postscript",
".aif": "audio/x-aiff",
".aiff": "audio/x-aiff",
".appcache": "text/cache-manifest",
".asc": "application/pgp-signature",
".asf": "video/x-ms-asf",
".asm": "text/x-asm",
@ -68,7 +69,7 @@
".json": "application/json",
".log": "text/plain",
".m3u": "audio/x-mpegurl",
".m4v": "video/mp4",
".m4v": "video/mp4",
".man": "text/troff",
".mathml": "application/mathml+xml",
".mbox": "application/mbox",
@ -152,6 +153,7 @@
".wma": "audio/x-ms-wma",
".wmv": "video/x-ms-wmv",
".wmx": "video/x-ms-wmx",
".woff": "font/woff",
".wrl": "model/vrml",
".wsdl": "application/wsdl+xml",
".xbm": "image/x-xbitmap",

View file

@ -387,15 +387,21 @@ var CloudCommander, Util,
* Example: http://domain.com/1.js -> 1_js
*/
DOM.getIdBySrc = function(pSrc){
var lID = pSrc.replace(pSrc.substr(pSrc,
pSrc.lastIndexOf('/')+1),
'');
var lRet = Util.isString(pSrc);
/* убираем точки */
while(lID.indexOf('.') > 0)
lID = lID.replace('.','_');
if(lRet){
var lNum = pSrc.lastIndexOf('/') + 1,
lSub = pSrc.substr(pSrc, lNum),
lID = Util.removeStr(pSrc, lSub );
/* убираем точки */
while(lID.indexOf('.') > 0)
lID = lID.replace('.', '_');
lRet = lID;
}
return lID;
return lRet;
},
/**

View file

@ -310,7 +310,7 @@ Util = exports || {};
*/
Util.removeStr = function(pStr, pSubStr){
var lRet;
if( Util.isString(pStr) ){
if( Util.isString(pStr) && Util.isString(pSubStr) ){
var n = pSubStr.length;
if( Util.isArray(pSubStr) )