Changeset 20876
- Timestamp:
- 10/07/08 07:48:03 (2 months ago)
- Files:
-
- 1 modified
-
lang/javascript/vimperator-plugins/trunk/lo.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/lo.js
r20875 r20876 48 48 if (!migemo) 49 49 return new RegExp(str, 'i'); 50 if (str.indexOf('/') == 0) {50 if (str.indexOf('/') == 0) 51 51 return new RegExp(str.slice(1), 'i'); 52 } else {52 else 53 53 return migemo.getRegExp(str); 54 }55 54 } 56 55 57 56 function filteredLinks (word) { 58 57 if (word.match(/^\s*$/)) 59 return []; // [it for each (it in content.document.links) if (it.href)]; 58 return []; // [it for each (it in content.document.links) if (it.href)]; 60 59 let re = makeRegExp(word); 61 return [it for each (it in content.document.links) if (lmatch(re, it))]; 60 return [it for each (it in content.document.links) if (lmatch(re, it))]; 62 61 } 63 62 … … 105 104 let links = filteredLinks(word); 106 105 return [0, [[it.href, it.textContent] for each (it in links)]]; 107 } ,106 } 108 107 } 109 108 ); … … 133 132 liberator.buffer.followLink(lolinks[0], where); 134 133 } else { 135 liberator.echoerr('lol') 134 liberator.echoerr('lol'); 136 135 } 137 136 }, 138 137 { 139 options: looptions ;138 options: looptions, 140 139 completer: function (word) { 141 140 let opts = liberator.parseArgs(word, looptions, "1", true); 142 141 log(opts); 143 lolinks = filteredLinks(word);//word.match(/\bhttp [^\s]+/));142 lolinks = filteredLinks(word);//word.match(/\bhttp\S+/)); 144 143 return [0, [[it.href, it.textContent] for each (it in lolinks)]]; 145 144 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)