Changeset 4709

Show
Ignore:
Timestamp:
01/16/08 21:28:18 (5 years ago)
Author:
drry
Message:

lang/javascript/userscripts/minibuffer.user.js: $X() 刷新時の手違いを直しました。正規表現を少し変更しました。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/minibuffer.user.js

    r4651 r4709  
    1515  initialize: function(){ 
    1616          this.orig_string = arguments[0]; 
    17           this.key = this.orig_string.replace(/(A|C|M|S)-/g,''); 
     17          this.key = this.orig_string.replace(/[ACMS]-/g,''); 
    1818  }, 
    1919  has: function(modifier){return this.orig_string.indexOf(modifier) != -1}, 
     
    11161116        if (!context) context = document; 
    11171117        var exp = (context.ownerDocument || context).createExpression(exp, function (prefix) { 
    1118                 var ns = { "atom" : "http://purl.org/atom/ns#", "hatena" : "http://www.hatena.ne.jp/info/xmlns#" }; 
    11191118                return document.createNSResolver((context.ownerDocument == null ? context 
    11201119                                                                                : context.ownerDocument).documentElement) 
    1121                                .lookupNamespaceURI(prefix) || ns[prefix] || document.documentElement.namespaceURI; 
     1120                               .lookupNamespaceURI(prefix) || document.documentElement.namespaceURI; 
    11221121        }); 
    11231122 
     
    11831182} 
    11841183var getSelectionText = function(){ 
    1185         return String(window.getSelection()).replace(/\r/g,'').split('\n').remove(""); 
     1184        return String(window.getSelection()).split('\r?\n|\r').remove(""); 
    11861185} 
    11871186var getSelectionNode = function(){