Changeset 868
- Timestamp:
- 2008-03-11 17:30:42 (8 months ago)
- Files:
-
- branches/1.0.x/chrome/content/common/internalFunctions.js (modified) (1 diff)
- branches/1.0.x/chrome/content/dta/manager.js (modified) (2 diffs)
- branches/1.0.x/chrome/help/masks.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0.x/chrome/content/common/internalFunctions.js
r719 r868 168 168 return this.removeFinalChar(SYSTEMSLASH); 169 169 }, 170 replaceSlashes: function(replaceWith) { 171 return this.replace(/[\\/]/g, replaceWith); 172 }, 170 173 normalizeSlashes: function() { 171 return this.replace (/[\\/]/g,SYSTEMSLASH);174 return this.replaceSlashes(SYSTEMSLASH); 172 175 }, 173 176 removeLeadingSlash : function() { branches/1.0.x/chrome/content/dta/manager.js
r859 r868 1284 1284 } 1285 1285 1286 this.description = this.description.removeBadChars().replace(/\\\//g, '').trim();1286 let description = this.description.removeBadChars().replace(/\\\//g, '').trim(); 1287 1287 1288 1288 let name = this.fileName; … … 1309 1309 } 1310 1310 let ref = this.referrer ? this.referrer.host.toString() : ''; 1311 let curl = (uri.host + ((uripath=="") ? "" : (SYSTEMSLASH + uripath))); 1311 1312 1312 1313 var replacements = { 1313 1314 "name": name, 1314 1315 "ext": ext, 1315 "text": this.description,1316 "text": description, 1316 1317 "url": host, 1317 1318 "subdirs": uripath, 1319 "flatsubdirs": uripath.replaceSlashes('-'), 1318 1320 "refer": ref, 1319 1321 "qstring": query, 1320 "curl": (uri.host + ((uripath=="")?"":(SYSTEMSLASH + uripath))), 1322 "curl": curl, 1323 "flatcurl": curl.replaceSlashes('-'), 1321 1324 "num": Utils.formatNumber(this.numIstance), 1322 1325 "hh": Utils.formatNumber(this.startDate.getHours(), 2), branches/1.0.x/chrome/help/masks.html
r818 r868 17 17 <table class="codesample"> 18 18 <tr> 19 <th>Renaming mask</th><th>Result</th> 19 <th>Renaming mask</th> 20 <th>Result</th> 20 21 </tr> 21 22 <tr> 22 <td>*name*.*ext*</td><td class="des">C:\Downloads\document.doc</td> 23 <td>*name*.*ext*</td> 24 <td class="des">C:\Downloads\document.doc</td> 23 25 </tr> 24 26 <tr> 25 <td>*name*_*hh*.*mm*.*ext*</td> <td class="des">C:\Downloads\document_23.30.doc</td>26 27 <td>*name*_*hh*.*mm*.*ext*</td> 28 <td class="des">C:\Downloads\document_23.30.doc</td> 27 29 </tr> 28 30 <tr> 29 <td>*name*_(*text*).*ext*</td><td class="des">C:\Downloads\document_(click here to download).doc</td> 31 <td>*name*_(*text*).*ext*</td> 32 <td class="des">C:\Downloads\document_(click here to download).doc</td> 30 33 </tr> 31 34 <tr> 32 <td>*num*_*name*.*ext*</td> <td class="des">C:\Downloads\032_document.doc33 < br/><span style="font-size:12px">(*num* tag will increment on every new dta session, it's a great way to avoid duplicate filenames!)</span></td>35 <td>*num*_*name*.*ext*</td> 36 <td class="des">C:\Downloads\032_document.doc<br/><span style="font-size:12px">(*num* tag will increment on every new dta session, it's a great way to avoid duplicate filenames!)</span></td> 34 37 </tr> 35 38 <tr> 36 <td>*ext*\*name*.*ext*</td><td class="des">C:\Downloads\doc\document.doc</td> 39 <td>*ext*\*name*.*ext*</td> 40 <td class="des">C:\Downloads\doc\document.doc</td> 37 41 </tr> 38 42 <tr> 39 <td>*m*-*d*-*y*\*name*.*ext*</td><td class="des">C:\Downloads\05-27-2006\document.doc</td> 43 <td>*m*-*d*-*y*\*name*.*ext*</td> 44 <td class="des">C:\Downloads\05-27-2006\document.doc</td> 40 45 </tr> 41 46 42 47 <tr> 43 <td>*url*\*name*.*ext*</td><td class="des">C:\Downloads\www.example.org\document.doc</td> 48 <td>*url*\*name*.*ext*</td> 49 <td class="des">C:\Downloads\www.example.org\document.doc</td> 50 </tr> 51 <tr> 52 53 <tr> 54 <td>*subdirs*\*name*.*ext*</td> 55 <td class="des">C:\Downloads\dir1\dir2\document.doc</td> 44 56 </tr> 45 57 46 58 <tr> 47 <td>*url*\*subdirs*\*name*.*ext*</td><td class="des">C:\Downloads\www.example.org\dir1\dir2\myfile.txt</td> 59 <td>*flatsubdirs*_*name*.*ext*</td> 60 <td class="des">C:\Downloads\dir1-dir2_document.doc</td> 48 61 </tr> 49 62 50 63 <tr> 51 <td>*curl*\*name*.*ext*</td><td class="des">C:\Downloads\www.example.org\dir1\dir2\myfile.txt</td> 64 <td>*curl*\*name*.*ext*</td> 65 <td class="des">C:\Downloads\www.example.org\dir1\dir2\document.doc</td> 66 </tr> 67 68 <tr> 69 <td>*flatcurl*_*name*.*ext*</td> 70 <td class="des">C:\Downloads\www.example.org-dir1-dir2_document.doc</td> 52 71 </tr> 53 72 54 73 <tr> 55 <td>*name*-*qstring*.*ext*</td><td class="des">C:\Downloads\myfile-something*.txt</td> 74 <td>*name*-*qstring*.*ext*</td> 75 <td class="des">C:\Downloads\document-something.doc</td> 56 76 </tr> 57 77
