Changeset 27922

Show
Ignore:
Timestamp:
01/05/09 01:33:27 (4 years ago)
Author:
drry
Message:
  • fixed a regex.
  • et cetera.
Files:
1 modified

Legend:

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

    r27701 r27922  
    1212  <name>Alert</name> 
    1313  <name lang="ja">アラート</name> 
    14   <description>Display an alert after the specified time.</description> 
     14  <description>Displays an alert after the specified time.</description> 
    1515  <description lang="ja">指定時間後にアラートダイアログを出したりする。タイマー。</description> 
    1616  <version>1.01</version> 
     
    276276 
    277277  let defaults = { 
    278     methods: (gv.alert_default_methods || 'alert').split(/[^\w]+/), 
     278    methods: (gv.alert_default_methods || 'alert').split(/\W+/), 
    279279    time: parseFloat(gv.alert_default_time || '3'), 
    280280    message: gv.alert_default_message || 'Time out!', 
     
    359359      let colors = ['red', 'blue', 'yellow']; 
    360360      let elem = content.document.body; 
    361       let indicator = elem.ownerDocument.createElement('div'); 
     361      let indicator = elem.appendChild(elem.ownerDocument.createElement('div')); 
    362362      let rect = elem.getBoundingClientRect(); 
    363363      indicator.id = 'nyantoro-element-indicator'; 
    364364      let style = 'background-color: ' + colors[0] + ';' + 
    365365                  'opacity: 0.5; z-index: 999;' + 
    366                   'position: fixed; ' + 
    367                   'top: '   +                    0 + 'px;' + 
    368                   'height:' + content.innerHeight + 'px;' + 
    369                   'left: '  +                    0 + 'px;' + 
    370                   'width: ' + content.innerWidth  + 'px'; 
     366                  'position: fixed;' + 
     367                  'top: '    +                   0 + 'px;' + 
     368                  'height: ' + content.innerHeight + 'px;' + 
     369                  'left: '   +                   0 + 'px;' + 
     370                  'width: '  +  content.innerWidth + 'px'; 
    371371      indicator.setAttribute('style', style); 
    372       elem.appendChild(indicator); 
    373372      let (count = 0) { 
    374373        let handle = setInterval(