Changeset 17610

Show
Ignore:
Timestamp:
08/14/08 08:57:35 (5 months ago)
Author:
anekos
Message:

command_menu -> name が undefined になるときに対処。原因不明。
migemized_find -> 文字ケース修正

Location:
lang/javascript/vimperator-plugins/trunk
Files:
2 modified

Legend:

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

    r16719 r17610  
    33// @description-ja メインメニューとツールバーをコマンドで実行できる 
    44// @license        Creative Commons 2.1 (Attribution + Share Alike) 
    5 // @version        1.2 
     5// @version        1.3 
    66// ==/VimperatorPlugin== 
    77// 
     
    116116 
    117117  function fixName (name) { 
    118     return name.replace(/^\s+|\s+$/, '').replace(/[\-\s]+/g, '_'); 
     118    return name ? name.replace(/^\s+|\s+$/, '').replace(/[\-\s]+/g, '_') : ''; 
    119119  } 
    120120 
  • lang/javascript/vimperator-plugins/trunk/migemized_find.js

    r17563 r17610  
    2525  // findMode := FIND_MODE_NATIVE | FIND_MODE_MIGEMO | FIND_MODE_REGEXP  
    2626 
    27   const findbarTextbox = document.getElementById('FindToolbar').getElement('findbar-textbox'); 
     27  const FindToolbar = document.getElementById('FindToolbar') 
     28  const FindbarTextbox = FindToolbar.getElement('findbar-textbox'); 
    2829  const DOMUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"]. 
    2930                      getService(Components.interfaces["inIDOMUtils"]); 
     
    3637  // とりあえず、アレな方法で not found を検出 
    3738  function isNotFound () { 
    38     let rules = DOMUtils.getCSSStyleRules(findbarTextbox); 
     39    let rules = DOMUtils.getCSSStyleRules(FindbarTextbox); 
    3940    for (let i = 0; i < rules.Count(); i++) { 
    4041      if (rules.GetElementAt(i).selectorText.indexOf('notfound') >= 0)