| 1 |
<?xml version="1.0" encoding="iso-2022-jp"?> |
| 2 |
<bindings xmlns="http://www.mozilla.org/xbl"> |
| 3 |
<binding id="middle-dot"> |
| 4 |
<implementation> |
| 5 |
<method name="insertDot" type="application/x-javascript" xml:space="preserve"> |
| 6 |
<parameter name="node" /> |
| 7 |
<body><![CDATA[ |
| 8 |
var nodes = node.childNodes; |
| 9 |
for (var i = 0; i < nodes.length; i++) |
| 10 |
if (nodes[i].hasChildNodes()) |
| 11 |
this.insertDot (nodes[i]); |
| 12 |
else if (nodes[i].nodeType == Node.TEXT_NODE) |
| 13 |
nodes[i].nodeValue = this.InsertDot (nodes[i].nodeValue); |
| 14 |
else if (nodes[i].alt) |
| 15 |
nodes[i].alt = this.InsertDot (nodes[i].alt); |
| 16 |
]]></body> |
| 17 |
</method> |
| 18 |
<method name="InsertDot" type="application/x-javascript" xml:space="preserve"> |
| 19 |
<parameter name="nodeValue" /> |
| 20 |
<body><![CDATA[ |
| 21 |
return nodeValue.replace (/(\w)\s*(?=\w)/g, '$1・瘢雹'); |
| 22 |
]]></body> |
| 23 |
</method> |
| 24 |
<constructor type="application/x-javascript" xml:space="preserve"> |
| 25 |
<![CDATA[ |
| 26 |
this.insertDot (this); |
| 27 |
]]> |
| 28 |
</constructor> |
| 29 |
</implementation> |
| 30 |
</binding> |
| 31 |
<binding id="backspace"> |
| 32 |
<implementation> |
| 33 |
<method name="nodeLength" type="application/x-javascript" xml:space="preserve"> |
| 34 |
<parameter name="node" /> |
| 35 |
<body><![CDATA[ |
| 36 |
var nodes = node.childNodes; |
| 37 |
var len = 0; |
| 38 |
for (var i = 0; i < nodes.length; i++) |
| 39 |
if (nodes[i].hasChildNodes()) |
| 40 |
len += this.nodeLength (nodes[i]); |
| 41 |
else if (nodes[i].nodeType == Node.TEXT_NODE) |
| 42 |
len += nodes[i].length; |
| 43 |
else if (nodes[i].alt) |
| 44 |
len += 1; //nodes[i].alt.length; |
| 45 |
return len; |
| 46 |
]]></body> |
| 47 |
</method> |
| 48 |
<constructor type="application/x-javascript" xml:space="preserve"> |
| 49 |
<![CDATA[ |
| 50 |
var t = ''; |
| 51 |
for (var i = 0; i < this.nodeLength (this); i++) |
| 52 |
t += '^H'; |
| 53 |
this.appendChild (document.createTextNode (t)); |
| 54 |
]]> |
| 55 |
</constructor> |
| 56 |
</implementation> |
| 57 |
</binding> |
| 58 |
</bindings> |
| 59 |
<!-- ***** BEGIN LICENSE BLOCK ***** |
| 60 |
- Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 61 |
- |
| 62 |
- The contents of this file are subject to the Mozilla Public License Version |
| 63 |
- 1.1 (the "License"); you may not use this file except in compliance with |
| 64 |
- the License. You may obtain a copy of the License at |
| 65 |
- <http://www.mozilla.org/MPL/> |
| 66 |
- |
| 67 |
- Software distributed under the License is distributed on an "AS IS" basis, |
| 68 |
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| 69 |
- for the specific language governing rights and limitations under the |
| 70 |
- License. |
| 71 |
- |
| 72 |
- The Original Code is SuikaWiki code. |
| 73 |
- |
| 74 |
- The Initial Developer of the Original Code is Wakaba. |
| 75 |
- Portions created by the Initial Developer are Copyright (C) 2003 |
| 76 |
- the Initial Developer. All Rights Reserved. |
| 77 |
- |
| 78 |
- Contributor(s): |
| 79 |
- Wakaba <[email protected]> |
| 80 |
- |
| 81 |
- Alternatively, the contents of this file may be used under the terms of |
| 82 |
- either the GNU General Public License Version 2 or later (the "GPL"), or |
| 83 |
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
| 84 |
- in which case the provisions of the GPL or the LGPL are applicable instead |
| 85 |
- of those above. If you wish to allow use of your version of this file only |
| 86 |
- under the terms of either the GPL or the LGPL, and not to allow others to |
| 87 |
- use your version of this file under the terms of the MPL, indicate your |
| 88 |
- decision by deleting the provisions above and replace them with the notice |
| 89 |
- and other provisions required by the LGPL or the GPL. If you do not delete |
| 90 |
- the provisions above, a recipient may use your version of this file under |
| 91 |
- the terms of any one of the MPL, the GPL or the LGPL. |
| 92 |
- |
| 93 |
- ***** END LICENSE BLOCK ***** --> |