Changeset 65
- Timestamp:
- 07/21/08 15:18:50 (2 months ago)
- Files:
-
- trunk/lily/lily/chrome/content/externals.js (modified) (1 diff)
- trunk/lily/lily/chrome/content/utils.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lily/lily/chrome/content/externals.js
r64 r65 69 69 */ 70 70 add:function(leafName,filePath) { 71 var stripped = LilyUtils.stripExtension(leafName); 72 if(typeof this.objLeaf["_"+stripped]=="undefined") { //no dupes 73 if(LilyUtils.isLegalID(stripped)) { 74 this.objArray.push({name:leafName,path:filePath}); 75 this.objLeaf["_"+stripped]=leafName; 71 if(!LilyUtils.isHelpPatch(leafName)) { //don't load help patches 72 var stripped = LilyUtils.stripExtension(leafName); 73 if(typeof this.objLeaf["_"+stripped]=="undefined") { //no dupes 74 if(LilyUtils.isLegalID(stripped)) { //check for illegal filenames 75 this.objArray.push({name:leafName,path:filePath}); 76 this.objLeaf["_"+stripped]=leafName; 77 } else { 78 LilyDebugWindow.error("Couldn't load the patch or external "+stripped+" because the name contains illegal characters."); 79 } 76 80 } else { 77 LilyDebugWindow.error("Couldn't load the patch or external "+stripped+" because the name contains illegal characters."); 78 } 79 } else { 80 LilyDebugWindow.error("Couldn't load the patch or external "+stripped+". An object with that name is already exists."); 81 LilyDebugWindow.error("Couldn't load the patch or external "+stripped+". An object with that name is already exists."); 82 } 81 83 } 82 84 }, trunk/lily/lily/chrome/content/utils.js
r64 r65 1422 1422 1423 1423 /* 1424 Method: isHelpPatch 1425 evaluates if a filenmae is a lily help patch. 1426 1427 Arguments: 1428 str - string to evaluate 1429 1430 Returns: 1431 returns boolean- true if help patch. 1432 */ 1433 isHelpPatch: function(str) { 1434 return (/\-help\.json$/.test(str)); 1435 }, 1436 1437 /* 1424 1438 Method: extractPatchDesc 1425 1439 get the patch size without having to eval the patch JSON.
