Changeset 9027
- Timestamp:
- 04/07/08 01:02:44 (5 years ago)
- Files:
-
- 1 modified
-
lang/javascript/userscripts/minibuffer.user.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/minibuffer.user.js
r8961 r9027 17 17 this.key = this.orig_string.replace(/[ACMS]-/g,''); 18 18 }, 19 has: function(modifier){return this.orig_string.indexOf(modifier) !=-1},19 has: function(modifier){return this.orig_string.indexOf(modifier) > -1}, 20 20 equal: function (e, ch){ 21 21 return (this.key == ch && … … 597 597 }, 598 598 bindBackwardWord: function(){ 599 var i=this.html.input, l=i.value.slice(0,i.selectionStart).replace(/[a-zA-Z0-9] *$|[^a-zA-Z0-9]*$/,'').length;599 var i=this.html.input, l=i.value.slice(0,i.selectionStart).replace(/[a-zA-Z0-9]+$|[^a-zA-Z0-9]+$/,'').length; 600 600 i.setSelectionRange(l,l); 601 601 }, … … 610 610 bindDeleteBackwardWord: function(){ 611 611 var i=this.html.input, b=i.selectionStart, e=i.selectionEnd; 612 var tx = i.value, tr=tx.slice(0,b-1).replace(/[^a-zA-Z0-9] *$/,'').replace(/[a-zA-Z0-9]*$/,''), l=tr.length;612 var tx = i.value, tr=tx.slice(0,b-1).replace(/[^a-zA-Z0-9]+$/,'').replace(/[a-zA-Z0-9]+$/,''), l=tr.length; 613 613 i.value = tr+tx.slice(e); 614 614 i.setSelectionRange(l,l); … … 814 814 font-size : 500%; 815 815 z-index : 10000; 816 816 817 817 padding : 50px; 818 818 left : 50%; 819 819 top : 50%; 820 820 margin : -1em; 821 821 822 822 background-color : #444; 823 823 color : #FFF; … … 1128 1128 context = context['context']; 1129 1129 } 1130 1130 1131 1131 if (!context) context = document; 1132 1132 var exp = (context.ownerDocument || context).createExpression(exp, function (prefix) { … … 1417 1417 1418 1418 String.prototype.escapeRegexp = function(){ 1419 return this.replace(/^ \?/, '.?').replace(/^\*/, '.*').replace(/\|/g,'\\|').replace(/\+/g,'\\+').replace(/\([^)]*$/, '').replace(/\[[^\]]*$/, '');1419 return this.replace(/^(?=[?*])/, '.').replace(/(?=[|+])/g, '\\').replace(/\([^)]*$/, '').replace(/\[[^\]]*$/, ''); 1420 1420 } 1421 1421 Array.prototype.position = function(obj){
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)