Changeset 14119

Show
Ignore:
Timestamp:
06/16/08 15:55:06 (5 years ago)
Author:
drry
Message:
  • $N() を少し変更しました。
Location:
lang/javascript/userscripts
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/gen1986.addacountinfo.user.js

    r7508 r14119  
    7272                        var tag = t[2], attrs = t[3], isempty = !!t[4]; 
    7373                        child = document.createElement(tag); 
    74                         attrs.replace(/([a-z]+)\s*=\s*(?:'((?:\\'|[^'])*)'|"((?:\\"|[^"])*)"|(\S+))/gi, 
    75                                 function (m, name, v1, v2, v3) { 
    76                                         child.setAttribute(name, v1 || v2 || v3); 
    77                                 } 
    78                         ); 
     74                        while (/([a-z]+)\s*=\s*(?:(["'])((?:\\\2|(?!\2).)*?)\2|(\S+))/gi.test(attrs)) { 
     75                                child.setAttribute(RegExp.$1, RegExp.$3 || RegExp.$4); 
     76                        } 
    7977                        cur.appendChild(child); 
    8078                        if (!isempty) { 
  • lang/javascript/userscripts/openfl.syncratewithldr.user.js

    r7993 r14119  
    158158                        var tag = t[2], attrs = t[3], isempty = !!t[4]; 
    159159                        child = document.createElement(tag); 
    160                         attrs.replace(/([a-z]+)\s*=\s*(?:'((?:\\'|[^'])*)'|"((?:\\"|[^"])*)"|(\S+))/gi, 
    161                                 function (m, name, v1, v2, v3) { 
    162                                         child.setAttribute(name, v1 || v2 || v3); 
    163                                 } 
    164                         ); 
     160                        while (/([a-z]+)\s*=\s*(?:(["'])((?:\\\2|(?!\2).)*?)\2|(\S+))/gi.test(attrs)) { 
     161                                child.setAttribute(RegExp.$1, RegExp.$3 || RegExp.$4); 
     162                        } 
    165163                        cur.appendChild(child); 
    166164                        if (!isempty) {