<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss1japanesefull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:admin="http://webns.net/mvcb/" xmlns:cc="http://web.resource.org/cc/" xmlns="http://purl.org/rss/1.0/" xml:lang="ja">

<channel rdf:about="http://www.code-404.net/">
<title>Code-404</title>
<link>http://www.code-404.net/</link>
<description>Web 関係の雑記です。</description>
<dc:language>ja</dc:language>
<dc:creator>シンヤ</dc:creator>
<dc:date>2009-02-12T19:19:21+09:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=4.01" />
<cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.1/jp/" cc:license="http://creativecommons.org/licenses/by-nc-sa/2.0/" />

<items>
<rdf:Seq>

<rdf:li rdf:resource="http://www.code-404.net/articles/css/unicode-escape" />

<rdf:li rdf:resource="http://www.code-404.net/articles/userscripts/result-number" />

<rdf:li rdf:resource="http://www.code-404.net/articles/movabletype/html-beautifully" />

<rdf:li rdf:resource="http://www.code-404.net/articles/browsers/user-agent-switcher-lite" />

<rdf:li rdf:resource="http://www.code-404.net/articles/browsers/main-menus-in-one" />

</rdf:Seq>
</items>

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rdf+xml" href="http://feeds.feedburner.com/jp/code404" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="jp/code404" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /></channel>


<item rdf:about="http://www.code-404.net/articles/css/unicode-escape">
<title>CSS 用の文字列の Unicode エスケープ</title>
<link>http://www.code-404.net/articles/css/unicode-escape</link>
<description>マルチバイト文字列を Unicode エスケープする CSS 用の変換ページを作成してみました。</description>
<content:encoded><![CDATA[<div class="section">
<h2 id="outline">概要</h2>
<p>Safari において、外部 <abbr title="Cascading Style Sheets">CSS</abbr> ファイルにマルチバイト文字を使用した際、文字化けが発生するバグが確認されています。これを回避するには、マルチバイト文字列を Unicode エスケープすればいいわけですが、 <abbr>CSS</abbr> 用の変換ページを見失ったため自分で作成してみました。</p>
</div>

<div class="section">
<h2 id="usage">利用法</h2>
<p><a href="http://www.code-404.net/appendix/css/unicode"><abbr title="Cascading Style Sheets">CSS</abbr> 用の文字列の Unicode エスケープ</a>にて、&quot;元テキスト&quot;に文字を入力するだけで、 &quot;Unicode エスケープ後のテキスト&quot;に変換されたテキストが表示されますので、コピーして下さい。</p>

<p>また、 <a href="http://www.code-404.net/appendix/css/unicode"><abbr>CSS</abbr> 用の文字列の Unicode エスケープ</a>は、そのページ単体で動作しますのでダウンロードして使う事も可能です。</p>

<h3 id="copyright">著作権</h3>
<p>JavaScript のコードの多くを<a href="http://piro.sakura.ne.jp/latest/blosxom/mozilla/xul/2005-09-28_unicode-escape.htm" title="Latest topics &gt; 通常の文字列とUnicodeエスケープの相互変換 - outsider reflex">通常の文字列と Unicode エスケープの相互変換</a>を参考にさせて頂きました。従って、 piro さんに帰属するものとします。</p>
</div>]]></content:encoded>

<dc:subject>CSS</dc:subject>

<dc:subject>decode</dc:subject>

<dc:subject>encode</dc:subject>

<dc:subject>escape</dc:subject>

<dc:subject>text</dc:subject>

<dc:subject>Unicode</dc:subject>

<dc:creator>シンヤ</dc:creator>
<dc:date>2009-02-12T19:19:21+09:00</dc:date>
<trackback:ping rdf:resource="http://www.code-404.net/cms/trackback/13" />
</item>


<item rdf:about="http://www.code-404.net/articles/userscripts/result-number">
<title>ResultNumbers.user.js</title>
<link>http://www.code-404.net/articles/userscripts/result-number</link>
<description>Google のウェブ検索結果に番号を振る Greasemonkey 用スクリプトです。</description>
<content:encoded><![CDATA[<div class="section">
<h2 id="outline">概要</h2>
<p><a href="http://www.google.com/">Google</a> のウェブ検索結果に番号を振る <a href="https://addons.mozilla.org/ja/firefox/addon/748" title="Greasemonkey :: Firefox Add-ons">Greasemonkey</a> 用スクリプトです。 <a href="http://userscripts.org/scripts/show/8551" title="AutoPagerize -- Userscripts.org" hreflang="en">AutoPagerize</a> 0.0.12 以降に対応しています。</p>

<h3 id="screenshot">スクリーンショット</h3>
<p><img src="/images/userscripts/result-numbers" width="267" height="239" alt="Result Numbers" /></p>
</div>

<div class="section">
<h2 id="install">インストール</h2>
<p>インストールは <a href="http://userscripts.org/" hreflang="en">Userscripts.org</a> より行ってください。</p>
<ul>
<li><a href="http://userscripts.org/scripts/show/11213" hreflang="en">Result Numbers -- Userscripts.org</a></li>
</ul>

<h3 id="version">バージョン</h3>
<dl>
<dt>1.0.1 - 2007-08-07</dt>
<dd>公開</dd>
<dt>1.0.2 - 2007-09-23</dt>
<dd>AutoPagerize 用の XPath を修正</dd>
<dt>1.0.3 - 2007-10-17</dt>
<dd>AutoPagerize 0.0.15 と 0.0.16 に対応</dd>
<dt>1.0.4 - 2007-10-20</dt>
<dd>AutoPagerize 0.0.17 に対応</dd>
<dt>1.0.5 - 2007-10-29</dt>
<dd>AutoPagerize が要素を追加した際の動作を修正</dd>
</dl>
</div>]]></content:encoded>

<dc:subject>Google</dc:subject>

<dc:subject>Greasemonkey</dc:subject>

<dc:subject>search</dc:subject>

<dc:subject>userscript</dc:subject>

<dc:creator>シンヤ</dc:creator>
<dc:date>2009-02-12T19:18:08+09:00</dc:date>
<trackback:ping rdf:resource="http://www.code-404.net/cms/trackback/11" />
</item>


<item rdf:about="http://www.code-404.net/articles/movabletype/html-beautifully">
<title>MT にて生成される HTML を綺麗に</title>
<link>http://www.code-404.net/articles/movabletype/html-beautifully</link>
<description>MT のテンプレートの視認性を保ったまま、 HTML にて多くの改行が生成される問題の回避方法です。</description>
<content:encoded><![CDATA[<div class="section">
<h2 id="premise">前提条件</h2>
<p><abbr title="Movable Type">MT</abbr> のテンプレートを記述する際、多くの人がその視認性を保つ為に <abbr>MT</abbr> 用のタグの後ろで改行するでしょう。しかし、そうした場合に生成される <abbr title="HyperText Markup Language">HTML</abbr> は多くの改行が生成され、人の為の視認性が極端に落ちます。通常は、目にする事のない <abbr>HTML</abbr> ソースですが、気になる人は気になるものです。</p>

<p>なんとか綺麗にしたいが、テンプレートが見難くなるのは嫌だという人は、この記事を参考にしてみて下さい。ほんの少しの書き換えで済みます。また、以下は Version 3.2-ja-2 での話になります。それ以外のバージョンでは該当する行数が若干変わっているでしょう。</p>

<ins datetime="2007-10-05T20:20:03+09:00">
<p>この変更方法は <strong class="notice"><abbr title="Movable Type">MT</abbr> 4 以降のバージョンでは全てのテンプレート (それは <abbr title="Movable Type">MT</abbr> が内部的に使用するものを含めて) でエラー</strong>になります。</p>
</ins>
</div>

<div class="section">
<h2 id="rewriting">Builder.pm の書き換え</h2>
<p>Builder.pm というファイルを書き換えます。格納されている場所は /lib/MT/Builder.pm です。 23 行目を見て下さい。</p>

<pre><code>    while ($text =~ m!(&lt;\$?MT(.+?)[\$/]?&gt;)!gs) {</code></pre>

<p>以上のようなコードになっているはずです。これを以下のように書き換えます。</p>

<pre><code>    while ($text =~ m!(&lt;\$?MT(.+?)[\$/]?&gt;<em>(\r?\n)?</em>)!gs) {</code></pre>

<p>次に 67 行目を見て下さい。</p>

<pre><code>    while ($$text =~ m!(&lt;([\$/]?)MT($stoptag[^&gt;]*?)[\$/]?&gt;)!g) {</code></pre>

<p>以上のようなコードを以下のように書き換えます。</p>

<pre><code>    while ($$text =~ m!(&lt;([\$/]?)MT($stoptag[^&gt;]*?)[\$/]?&gt;<em>(\r?\n)?</em>)!g) {</code></pre>

<p>以上で書き換え作業は終わりです。それぞれ強調された部分が追加されたコードです。これらはつまり、 <abbr title="Movable Type">MT</abbr> 用のタグの後の改行にもマッチさせているだけです。</p>
</div>

<div class="section">
<h2 id="finally">最後に</h2>
<p>この書き換えは、ごく簡単でしょうが書き換える場所を間違えると、エラーは出ないものの正しく <abbr title="HyperText Markup Language">HTML</abbr> が生成されなくなりますので注意してください。</p>

<p>もしも、テンプレートで改行を削り、 <abbr>HTML</abbr> にて多くの改行を生成する問題を回避していても、この書き換え作業を施したところで何も変化はありません。</p>

<p>また、 <code>(\r?\n)?</code> でなく、 <code>\n?</code> だけでもいいかも知れません。</p>
</div>]]></content:encoded>

<dc:subject>HTML</dc:subject>

<dc:subject>MovableType</dc:subject>

<dc:subject>source</dc:subject>

<dc:subject>template</dc:subject>

<dc:creator>シンヤ</dc:creator>
<dc:date>2009-02-12T19:12:48+09:00</dc:date>
<trackback:ping rdf:resource="http://www.code-404.net/cms/trackback/1" />
</item>


<item rdf:about="http://www.code-404.net/articles/browsers/user-agent-switcher-lite">
<title>UserAgentSwitcherLite.uc.js</title>
<link>http://www.code-404.net/articles/browsers/user-agent-switcher-lite</link>
<description>User Agent Switcher の機能を簡素にした userChrome.js 用スクリプトです。ツールメニューに項目を増やします。</description>
<content:encoded><![CDATA[<div class="section">
<h2 id="outline">概要</h2>
<p><a href="http://chrispederick.com/work/user-agent-switcher/" hreflang="en">User Agent Switcher</a> の機能を簡素にした <a href="http://forums.mozillazine.org/viewtopic.php?t=556229" title="[Ext] userChrome.js 0.8 - MozillaZine Forums" hreflang="en">userChrome.js</a> 用スクリプトです。ツールメニューに項目を増やします。</p>

<p>このスクリプトは general.useragent.override に値を保存します。デフォルトを選択すると general.useragent.override を削除します。</p>

<h3 id="screenshot">スクリーンショット</h3>
<p><img src="/images/userchromes/user-agent-switcher-lite" width="450" height="273" alt="User Agent Switcher Lite" /></p>
</div>

<div class="section">
<h2 id="usage">使い方</h2>
<p>以下の<a href="#source">ソースコード</a>を userChrome.js に貼り付けるだけです。サブスクリプトローダーを使用している場合は、 &quot;任意の名前.uc.js&quot; とし、 chrome フォルダに置くだけです。</p>

<h3 id="version">バージョン</h3>
<dl>
<dt><a href="/files/userchromes/UserAgentSwitcherLite-1_0.uc.js" title="UserAgentSwitcherLite.uc.js ver. 1.0">1.0</a> -  2007-07-22</dt>
<dd>公開</dd>
</dl>

<h3 id="source">ソースコード</h3>
<pre><code class="javascript">// ==UserScript==
// @name           User Agent Switcher Lite
// @version        1.0
// @description    Like User Agent Switcher extention.
// @author         Shinya
// @homepage       http://www.code-404.net/articles/browsers/user-agent-switcher-lite
// @namespace      http://www.code-404.net/
// @compatibility  Firefox 2.0 3.0
// @include        chrome://browser/content/browser.xul
// @Note           
// ==/UserScript==

(function(){
  
  var locale = Components.classes[&quot;@mozilla.org/preferences-service;1&quot;].
    getService(Components.interfaces.nsIPrefBranch);
  locale = locale.getCharPref(&quot;general.useragent.locale&quot;);
  
  var userAgent = [
    {
      label: &quot;Internet Explorer 6.0 (Windows XP)&quot;,
      accesskey: &quot;I&quot;,
      agent: &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)&quot;
    },
    {
      label: &quot;Netscape 4.8 (Windows XP)&quot;,
      accesskey: &quot;N&quot;,
      agent: &quot;Mozilla/4.8 [en] (Windows NT 5.1; U)&quot;
    },
    {
      label: &quot;Opera 8.51 (Windows XP)&quot;,
      accesskey: &quot;O&quot;,
      agent: &quot;Opera/8.51 (Windows NT 5.1; U; en)&quot;
    },
    {
      label: &quot;separator&quot;,
    },
    {
      label: &quot;Internet Explorer 5.22 (Mac OS)&quot;,
      accesskey: &quot;M&quot;,
      agent: &quot;Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)&quot;
    },
    {
      label: &quot;Safai (Mac OS X)&quot;,
      accesskey: &quot;S&quot;,
      agent: &quot;Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-JP) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12&quot;
    },
    {
      label: &quot;separator&quot;,
    },
    {
      label: &quot;DoCoMo SH901iC&quot;,
      accesskey: &quot;C&quot;,
      agent: &quot;DoCoMo/2.0 SH901iC(c100;TB;W24H12)&quot;
    },
    {
      label: locale.indexOf(&quot;ja&quot;) == -1 ? &quot;EZweb&quot; : &quot;EZweb (WAP 2.0/XHTML-MP\u5bfe\u5fdc\u6a5f)&quot;,
      accesskey: &quot;E&quot;,
      agent: &quot;KDDI-KC31 UP.Browser/6.2.0.5 (GUI) MMP/2.0&quot;
    },
    {
      label: locale.indexOf(&quot;ja&quot;) == -1 ? &quot;Vodafone live!&quot; : &quot;Vodafone live! (\u65b03G)&quot;,
      accesskey: &quot;V&quot;,
      agent: &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)&quot;
    },
    {
      label: &quot;Air EDGE PHONE&quot;,
      accesskey: &quot;A&quot;,
      agent: &quot;Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0&quot;
    },
    {
      label: 'H&quot;',
      accesskey: &quot;H&quot;,
      agent: &quot;PDXGW/1.0 (TX=8;TY=6;GX=96;GY=64;C=G2;G=B2;GI=0)&quot;
    },
    {
      label: locale.indexOf(&quot;ja&quot;) == -1 ? &quot;ASTEL&quot; : &quot;ASTEL \u30c9\u30c3\u30c8i&quot;,
      accesskey: &quot;J&quot;,
      agent: &quot;ASTEL/1.0/J-0511.00/c10/smel&quot;
    },
    {
      label: &quot;separator&quot;,
    },
    {
      label: &quot;Google&quot;,
      accesskey: &quot;G&quot;,
      agent: &quot;Googlebot/2.1 (+http://www.google.com/bot.html)&quot;
    },
    {
      label: &quot;Yahoo!&quot;,
      accesskey: &quot;Y&quot;,
      agent: &quot;Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)&quot;
    },
    {
      label: &quot;MSN&quot;,
      accesskey: &quot;B&quot;,
      agent: &quot;msnbot/0.11 (+http://search.msn.com/msnbot.htm)&quot;
    },
  ];
  
  init: {
    var menuPopup = document.getElementById(&quot;menu_ToolsPopup&quot;);
    var separator = document.getElementById(&quot;sanitizeSeparator&quot;);
    
    var menu = document.createElement(&quot;menu&quot;);
    menu.id = &quot;ua-switcher-lite&quot;;
    menu.setAttribute(&quot;label&quot;, &quot;User Agent Switcher Lite&quot;);
    menu.setAttribute(&quot;accesskey&quot;, &quot;U&quot;);
    menuPopup.insertBefore(menu, separator);
    
    menuPopup = document.createElement(&quot;menupopup&quot;);
    menu.appendChild(menuPopup);
    
    // Default
    var menuItem = document.createElement(&quot;menuitem&quot;);
    menuItem.setAttribute(&quot;label&quot;, locale.indexOf(&quot;ja&quot;) == -1 ? &quot;Default&quot; : &quot;\u30c7\u30d5\u30a9\u30eb\u30c8&quot;);
    menuItem.setAttribute(&quot;accesskey&quot;, &quot;D&quot;);
    menuItem.setAttribute(&quot;type&quot;, &quot;radio&quot;);
    menuItem.id = &quot;ua-switcher-lite-default&quot;;
    menuItem.culMenu = {agent: false};
    menuItem.addEventListener(&quot;command&quot;, setUserAgent, false);
    menuPopup.appendChild(menuItem);
    
    // Separator
    menuItem = document.createElement(&quot;menuseparator&quot;);
    menuItem.id = &quot;ua-switcher-lite-sep-default&quot;;
    menuPopup.appendChild(menuItem);
    
    
    for (var i = 0; menu = userAgent[i]; i++) {
      if (menu.label == &quot;separator&quot;) {
        menuItem = document.createElement(&quot;menuseparator&quot;);
      }
      else {
        menuItem = document.createElement(&quot;menuitem&quot;);
        menuItem.setAttribute(&quot;label&quot;, menu.label);
        if (&quot;accesskey&quot; in menu) menuItem.setAttribute(&quot;accesskey&quot;, menu.accesskey);
        menuItem.setAttribute(&quot;type&quot;, &quot;radio&quot;);
        menuItem.culMenu = menu;
        menuItem.addEventListener(&quot;command&quot;, setUserAgent, false);
      }
      menuItem.id = &quot;ua-switcher-lite-&quot; + i;
      menuPopup.appendChild(menuItem);
    }
    
    document.getElementById(&quot;ua-switcher-lite&quot;).addEventListener(&quot;popupshowing&quot;, function(){
      setUserAgentDisplay(menuPopup)
    }, false);
  }
  
  function setDefault(){
    
  }
  
  function setUserAgent(aEvent){
    var pref = Components.classes[&quot;@mozilla.org/preferences;1&quot;]
      .getService(Components.interfaces.nsIPrefBranch);
    
    // デフォルトを選んだら項目を削除
    if(!aEvent.target.culMenu.agent){
      pref.clearUserPref(&quot;general.useragent.override&quot;);
      return;
    }
    
    var nsISupportsString = Components.interfaces.nsISupportsWString ||
      Components.interfaces.nsISupportsString;
    var ua = (Components.classes[&quot;@mozilla.org/supports-wstring;1&quot;]) ?
      Components.classes['@mozilla.org/supports-wstring;1']
        .createInstance(nsISupportsString) :
      Components.classes['@mozilla.org/supports-string;1']
        .createInstance(nsISupportsString);
    ua.data = aEvent.target.culMenu.agent;
    
    // 項目に値を設定
    pref.setComplexValue(&quot;general.useragent.override&quot;, nsISupportsString, ua);
  }
  
  function setUserAgentDisplay(menuPopup) {
    var menu = menuPopup.childNodes;
    
    var pref = Components.classes[&quot;@mozilla.org/preferences;1&quot;]
      .getService(Components.interfaces.nsIPrefBranch);
    
    var nsISupportsString = Components.interfaces.nsISupportsWString ||
      Components.interfaces.nsISupportsString;
    
    // general.useragent.overrideが存在するか
    var ua;
    try{
      ua = pref.getComplexValue(&quot;general.useragent.override&quot;, nsISupportsString).data;
    }catch(e){
      ua;
    }
    
    // 無ければデフォルト
    if(!ua){
      menu[0].setAttribute(&quot;checked&quot;, true);
      return;
    }
    
    // 設定値にチェック
    for(var i = 0; i &lt; menu.length; i++){
      if(!menu[i].culMenu) continue; // 区切り
      if(menu[i].culMenu.agent == ua) {
        menu[i].setAttribute(&quot;checked&quot;, true);
        break;
      }
    }
  }
  
})();</code></pre>
</div>]]></content:encoded>

<dc:subject>Firefox</dc:subject>

<dc:subject>JavaScript</dc:subject>

<dc:subject>UserAgent</dc:subject>

<dc:subject>userChrome.js</dc:subject>

<dc:creator>シンヤ</dc:creator>
<dc:date>2009-02-12T19:09:57+09:00</dc:date>
<trackback:ping rdf:resource="http://www.code-404.net/cms/trackback/10" />
</item>


<item rdf:about="http://www.code-404.net/articles/browsers/main-menus-in-one">
<title>MainMenusInOne.uc.js</title>
<link>http://www.code-404.net/articles/browsers/main-menus-in-one</link>
<description>メインメニューの項目を 1 つにまとめる userChrome.js 用スクリプトです。</description>
<content:encoded><![CDATA[<div class="section">
<h2 id="outline">概要</h2>
<p>メインメニューの項目を 1 つにまとめる <a href="http://forums.mozillazine.org/viewtopic.php?t=556229" title="[Ext] userChrome.js 0.8 - MozillaZine Forums" hreflang="en">userChrome.js</a> 用スクリプトです。</p>

<h3 id="screenshot">スクリーンショット</h3>
<p><img src="/images/userchromes/main-menus-in-one.png" width="358" height="276" alt="Main Menus In One" /></p>
</div>

<div class="section">
<h2 id="usage">使い方</h2>
<p>以下の<a href="#source">ソースコード</a>を userChrome.js に貼り付けるだけです。サブスクリプトローダーを使用している場合は、 &quot;任意の名前.uc.js&quot; とし、 chrome フォルダに置くだけです。</p>

<h3 id="version">バージョン</h3>
<dl>
<dt><a href="/files/userchromes/MinMenusInOne-1_0.uc.js" title="MinMenusInOne.uc.js ver. 1.0">1.0</a> -  2007-07-19</dt>
<dd>公開</dd>
<dt><a href="/files/userchromes/MinMenusInOne-1_0_2.uc.js" title="MinMenusInOne.uc.js ver. 1.0.2">1.0.2</a> -  2007-08-24</dt>
<dd>起動時にメニューが消える不具合を修正</dd>
</dl>

<h3 id="source">ソースコード</h3>
<pre><code class="javascript">// ==UserScript==
// @name           Main Menus in One
// @version        1.0.2
// @description    Gather up items of the main menu to 1 item.
// @author         Shinya
// @namespace      http://www.code-404.net/
// @homepage       http://www.code-404.net/articles/browsers/main-menus-in-one
// @compatibility  Firefox 2.0 3.0
// @include        chrome://browser/content/browser.xul
// @Note           
// ==/UserScript==

(function(){
  var menuBar = document.getElementById(&quot;main-menubar&quot;);
  
  var locale = Components.classes[&quot;@mozilla.org/preferences-service;1&quot;].
    getService(Components.interfaces.nsIPrefBranch);
  locale = locale.getCharPref(&quot;general.useragent.locale&quot;);
  
  // 「メニュー(M)」を作成
  var menu = document.createElement(&quot;menu&quot;);
  menu.setAttribute(&quot;label&quot;, locale.indexOf(&quot;ja&quot;) == -1 ? &quot;Menu&quot; : &quot;\u30e1\u30cb\u30e5\u30fc&quot;);
  menu.id = &quot;menu-menu&quot;;
  menu.setAttribute(&quot;accesskey&quot;, &quot;M&quot;);
  menu.setAttribute(&quot;disabled&quot;, false);
  
  // メニューバーから既存のアイテムを抜く
  var items = new Array();
  for(var i = 0;i &lt; menuBar.childNodes.length;i++){
    items.push(menuBar.childNodes[i]);
  }
  
  var menuPopup = document.createElement(&quot;menupopup&quot;);
  menuPopup.id = &quot;menu_menusPopup&quot;;
  
  menu.appendChild(menuPopup);
  
  // 「メニュー(M)」に既存アイテムを追加
  for(var i = 0;i &lt; items.length;i++){
    menuPopup.appendChild(items[i]);
  }
  
  menuBar.appendChild(menu);

})();</code></pre>
</div>]]></content:encoded>

<dc:subject>Firefox</dc:subject>

<dc:subject>JavaScript</dc:subject>

<dc:subject>menu</dc:subject>

<dc:subject>userChrome.js</dc:subject>

<dc:creator>シンヤ</dc:creator>
<dc:date>2009-02-12T19:07:38+09:00</dc:date>
<trackback:ping rdf:resource="http://www.code-404.net/cms/trackback/9" />
</item>


<cc:License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /><cc:prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" /></cc:License></rdf:RDF>

