/[suikacvs]/webroot/www/style/ui/title.xbl
Suika

Contents of /webroot/www/style/ui/title.xbl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Mar 10 00:30:51 2004 UTC (20 years, 2 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
New

1 <?xml version="1.0"?>
2 <bindings xmlns="http://www.mozilla.org/xbl">
3 <binding id="title">
4 <implementation>
5 <constructor type="application/x-javascript" xml:space="preserve">
6 <![CDATA[
7 // <http://white.sakura.ne.jp/~piro/xul/tips/x0013.html>
8 function getInnerText(node) {
9 var nodes = node.childNodes;
10 var ret = [];
11 for (var i = 0; i < nodes.length; i++)
12 if (nodes[i].hasChildNodes())
13 ret.push(getInnerText(nodes[i]));
14 else if (nodes[i].nodeType == Node.TEXT_NODE)
15 ret.push(nodes[i].nodeValue);
16 else if (nodes[i].alt)
17 ret.push(nodes[i].alt);
18 return ret.join('');
19 }
20 document.title = getInnerText (this);
21 ]]>
22 </constructor>
23 </implementation>
24 </binding>
25 </bindings>
26 <!-- ***** BEGIN LICENSE BLOCK *****
27 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
28 -
29 - The contents of this file are subject to the Mozilla Public License Version
30 - 1.1 (the "License"); you may not use this file except in compliance with
31 - the License. You may obtain a copy of the License at
32 - <http://www.mozilla.org/MPL/>
33 -
34 - Software distributed under the License is distributed on an "AS IS" basis,
35 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
36 - for the specific language governing rights and limitations under the
37 - License.
38 -
39 - The Original Code is SuikaWiki code.
40 -
41 - The Initial Developer of the Original Code is Wakaba.
42 - Portions created by the Initial Developer are Copyright (C) 2003
43 - the Initial Developer. All Rights Reserved.
44 -
45 - Contributor(s):
46 - Wakaba <w@suika.fam.cx>
47 -
48 - Alternatively, the contents of this file may be used under the terms of
49 - either the GNU General Public License Version 2 or later (the "GPL"), or
50 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
51 - in which case the provisions of the GPL or the LGPL are applicable instead
52 - of those above. If you wish to allow use of your version of this file only
53 - under the terms of either the GPL or the LGPL, and not to allow others to
54 - use your version of this file under the terms of the MPL, indicate your
55 - decision by deleting the provisions above and replace them with the notice
56 - and other provisions required by the LGPL or the GPL. If you do not delete
57 - the provisions above, a recipient may use your version of this file under
58 - the terms of any one of the MPL, the GPL or the LGPL.
59 -
60 - ***** END LICENSE BLOCK ***** -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24