mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
added appcache and woff properties
This commit is contained in:
parent
32574cdef9
commit
fa80e54503
3 changed files with 17 additions and 9 deletions
|
|
@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue