Changeset 24718 for lang/javascript

Show
Ignore:
Timestamp:
11/24/08 06:08:10 (5 years ago)
Author:
drry
Message:
  • fixed regexes.
Location:
lang/javascript/vimperator-plugins/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/ldrize_cooperation_fetch_flv.js

    r24657 r24718  
    1414    const nicoWatchEndPoint = 'http://www.nicovideo.jp/watch/'; 
    1515    let videoId = url.match(/\w{2}\d+/)[0]; 
    16     let fileName = title.replace(/[?\\\*\/:<>\|\"]/g, '_') + '.flv'; 
     16    let fileName = title.replace(/[?\\*\/:<>|"]/g, '_') + '.flv'; 
    1717 
    1818    httpGET( 
     
    8989            arg.string || liberator.modules.buffer.URL, 
    9090            function (responseText) { 
    91                 let [, title] = responseText.match(/<title>(.*?)<\/title>/i); 
     91                let [, title] = responseText.match(/<title(?:[ \t\r\n][^>]*)?>([^<]*)<\/title[ \t\n\r]*>/i); 
    9292                liberator.log(title); 
    9393                NiconicoFlvHandler(arg.string || liberator.modules.buffer.URL, title); 
  • lang/javascript/vimperator-plugins/trunk/stella.js

    r24714 r24718  
    5252 
    5353  function capitalize (s) 
    54     s.replace(/^./, String.toUpperCase); 
     54    s.replace(/^[a-z]/, String.toUpperCase); 
    5555 
    5656 
     
    8383      pause: '', 
    8484      muted: '', 
    85       repeating: '', 
     85      repeating: '' 
    8686    }, 
    8787 
     
    161161      pause: 'x', 
    162162      muted: 'rwt', 
    163       repeating: 'rw', 
     163      repeating: 'rw' 
    164164    }, 
    165165 
     
    287287  const ContextMenuVolume = []; 
    288288  for (let i = 0; i <= 100; i += 10) 
    289     ContextMenuVolume.push({name: 'setVolume', label:   i + '%', attributes: {volume:  i}}) 
     289    ContextMenuVolume.push({name: 'setVolume', label: i + '%', attributes: {volume: i}}) 
    290290 
    291291  const ContextMenuTree = [