/[suikacvs]/www/ie/iemenu/show-heading-list.html
Suika

Contents of /www/ie/iemenu/show-heading-list.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Sat Mar 30 14:59:00 2002 UTC (22 years, 1 month ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Branch point for: experimental
Changes since 1.1: +2 -2 lines
File MIME type: text/html
2002-03-30  wakaba <w@suika.fam.cx>

	* ChangeLog: New file.
	
	* *.html: New files.
	
	* mkreg.bat, mkreg.pl: New files.
	* doc/: New directory.

1 <!-- Show list of heading elements
2 #name Show list of headings
3 #context default
4 -->
5 <script language="JScript" defer="defer">
6 var doc = external.menuArguments.document;
7 var myself = replace_specials (doc.location.href);
8 var itext = '';
9 for (var i = 0; i < doc.body.all.length; i++) {
10 var el = doc.body.all(i);
11 var tn = el.tagName;
12 if (tn == 'H1' || tn == 'H2' || tn == 'H3'
13 || tn == 'H4' || tn == 'H5' || tn == 'H6') {
14 var hid = '';
15 if (el.id) hid = el.id
16 else {
17 el.id = 'x-f-heading-' + i;
18 hid = el.id;
19 }
20 var htext = el.innerText
21 htext = htext.replace(/&/g,'&amp;');
22 htext = htext.replace(/</g,'&lt;');
23 htext = htext.replace(/>/g,'&gt;');
24 itext += '<li class="x-f-heading-' + tn + '">'
25 + '<a href="' + myself + '#' + hid
26 + '" target="_self">' + tn + ': '
27 + htext + '</a></li>';
28 }
29 }
30 // insert comments before BODY element
31 if (itext) {
32 itext = '<ins class="x-f-heading"><ul>' + itext + '</ul></ins>';
33 doc.body.all(0).outerHTML = itext + doc.body.all(0).outerHTML;
34 }
35 function replace_specials (rt) {
36 rt = rt.replace(/&/g,'&amp;');
37 rt = rt.replace(/</g,'&lt;');
38 rt = rt.replace(/>/g,'&gt;');
39 return rt;
40 }
41 </script>
42 <!--
43 Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>.
44
45 This program is free software; you can redistribute it and/or modify
46 it under the terms of the GNU General Public License as published by
47 the Free Software Foundation; either version 2 of the License, or
48 (at your option) any later version.
49
50 This program is distributed in the hope that it will be useful,
51 but WITHOUT ANY WARRANTY; without even the implied warranty of
52 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 GNU General Public License for more details.
54
55 You should have received a copy of the GNU General Public License
56 along with this program; see the file COPYING. If not, write to
57 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
58 Boston, MA 02111-1307, USA.
59
60 $Date: 2002/03/30 13:47:56 $
61 -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24