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

Contents of /www/ie/iemenu/show-head.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Sat Mar 30 13:47:56 2002 UTC (22 years, 7 months ago) by wakaba
Branch: MAIN, wakaba
CVS Tags: initiali, HEAD
Branch point for: experimental
Changes since 1.1: +0 -0 lines
File MIME type: text/html

1 <!-- Show list of link elements and meta information
2 #name Show <head> information
3 #context default
4 -->
5 <script language="JScript" defer="defer">
6 var doc = external.menuArguments.document;
7 var head = doc.getElementsByTagName('head').item(0);
8 var itext = ''; var mtext = '';
9 for (var i = 0; i < head.all.length; i++) {
10 var el = head.all(i); var tn = el.tagName;
11 if (tn == 'LINK') {
12 var Ahref = el.href; var htext = '';
13 Ahref = Ahref.replace(/&/g,'&amp;');
14 Ahref = Ahref.replace(/</g,'&lt;');
15 Ahref = Ahref.replace(/>/g,'&gt;');
16 if (el.title) htext = el.title + ' ';
17 if (el.hreflang) htext += '{language=' + el.hreflang + '} ';
18 if (el.media) htext += '{media=' + el.media + '} ';
19 if (el.type) htext += '{media-type=' + el.type + '} ';
20 if (el.charset) htext += '{charset=' + el.charset + '} ';
21 htext += '(' + el.href + ')';
22 var lrel = '';
23 if (el.rel) lrel += el.rel + ' ';
24 if (el.rev) lrel += '&lt;-' + el.rev;
25 itext += '<li class="x-f-link">';
26 itext += '<a href="' + Ahref + '" class="x-f-link-rel"'
27 + ' title="' + htext + '" target="_self">'
28 + lrel + '</a></li>';
29 } else if (tn == 'META') {
30 var mname = ''; var mlang = el.lang;
31 var mvalue = el.content; var mtitle = el.title;
32 if (el.name) {mname = el.name + ' = '}
33 else if (el.httpEquiv) mname = el.httpEquiv + ': ';
34 mtext += '<li class="x-f-meta"'
35 if (mlang) {
36 mtext += ' lang="' + mlang + '"';
37 mname += ' {' + mlang + '}';
38 }
39 if (mtitle) mtext += ' title="' + replace_specials (mtitle) + '"';
40 mtext += '>' + replace_specials (mname);
41 mtext += replace_specials (mvalue) + '</li>';
42 } else if (tn == 'TITLE') {
43 var mlang = el.lang;
44 var mvalue = el.text; var mtitle = el.title;
45 mtext += '<li class="x-f-title"';
46 if (mlang)
47 mtext += ' lang="' + mlang + '"';
48 if (mtitle) mtext += ' title="' + replace_specials (mtitle) + '"';
49 mtext += '>&lt;title&gt; = ';
50 mtext += replace_specials (mvalue) + '</li>';
51 } else if (tn == 'BASE') {
52 var mtitle = el.title;
53 mtext += '<li class="x-f-base"';
54 if (mtitle) mtext += ' title="' + replace_specials (mtitle) + '"';
55 mtext += '>&lt;base&gt; =';
56 if (el.href) { /* base URI */
57 var mvalue = replace_specials (el.href);
58 mtext += ' &lt;<a href="' + mvalue + '" target="_self">';
59 mtext += mvalue + '</a>&gt;';
60 }
61 if (el.target) {
62 var mvalue = replace_specials (el.target);
63 mtext += ' {target=' + mvalue + '}';
64 }
65 mtext += '</li>';
66 }
67 }
68 // insert
69 if (mtext) {
70 mtext = '<ins class="x-f-meta"><ul>' + mtext + '</ul></ins>';
71 doc.body.all(0).outerHTML = mtext + doc.body.all(0).outerHTML;
72 }
73 if (itext) {
74 itext = '<ins class="x-f-link"><ul>' + itext + '</ul></ins>';
75 doc.body.all(0).outerHTML = itext + doc.body.all(0).outerHTML;
76 }
77 function replace_specials (rt) {
78 rt = rt.replace(/&/g,'&amp;');
79 rt = rt.replace(/</g,'&lt;');
80 rt = rt.replace(/>/g,'&gt;');
81 return rt;
82 }
83 </script>
84 <!--
85 Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>.
86
87 This program is free software; you can redistribute it and/or modify
88 it under the terms of the GNU General Public License as published by
89 the Free Software Foundation; either version 2 of the License, or
90 (at your option) any later version.
91
92 This program is distributed in the hope that it will be useful,
93 but WITHOUT ANY WARRANTY; without even the implied warranty of
94 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95 GNU General Public License for more details.
96
97 You should have received a copy of the GNU General Public License
98 along with this program; see the file COPYING. If not, write to
99 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
100 Boston, MA 02111-1307, USA.
101
102 $Date: $
103 -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24