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

Contents of /www/ie/iemenu/show-relative-uri.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Sat May 25 21:53:47 2002 UTC (22 years, 6 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +5 -2 lines
File MIME type: text/html
Error occurred while calculating annotation data.
2002-05-26  wakaba <w@suika.fam.cx>

	* show-relative-uri.html: Fix typo and note it.

1 <!-- Show cite attribute of BLOCKQUOTE, Q, INS, DEL elements,
2 datetime attribute of INS, DEL elements,
3 longdesc attribute of IMG elements,
4 summary attribute of TABLE element.
5 #name Show related URIs
6 #context default image table
7 Note: `relative' of filename is only a typo:-) This file
8 does NOT provide the function to show RELATIVE URI(s),
9 but to show RELATED URI(s).
10 -->
11 <script language="JScript" defer="defer">
12 var doc = external.menuArguments.document;
13 for (var i = 0; i < doc.body.all.length; i++) {
14 var el = doc.body.all(i);
15 if (el.tagName == "BLOCKQUOTE") {
16 if (el.cite != null) {
17 var ot = replace_specials (el.cite);
18 el.innerHTML = '<div class="x-f-citation-uri">'
19 + 'Source: &lt;<a target="_self" href="'
20 + ot + '">' + ot + '</a>&gt;</div> '
21 + el.innerHTML;
22 i += 2;
23 }
24 } else if (el.tagName == "Q") {
25 if (el.cite != null) {
26 var ot = replace_specials (el.cite);
27 if (el.parentElement.tagName == "A") {
28 el.innerHTML = ' <span class="x-f-citation-uri">'
29 + 'Source: &lt;' + ot + '&gt;</span>'
30 + el.innerHTML;
31 i += 1;
32 } else {
33 el.innerHTML = '<span class="x-f-citation-uri">'
34 + 'Source: &lt;<a target="_self" href="'
35 + ot + '">' + ot + '</a>&gt;</span> '
36 + el.innerHTML;
37 i += 2;
38 }
39 }
40 } else if (el.tagName == "INS" || el.tagName == "DEL") {
41 if (el.datetime != null) {
42 if (el.title) {el.title += ' @'} else el.title = '@';
43 el.title += el.datetime;
44 }
45 if (el.cite != null) {
46 var ot = replace_specials (el.cite);
47 if (el.parentElement.tagName == "A") {
48 el.innerHTML = ' <span class="x-f-description-uri">'
49 + '[<span title="Description: &lt;'
50 + ot + '&gt;">D: &lt;' + ot + '&gt;</span>]</span>'
51 + el.innerHTML;
52 } else {
53 el.innerHTML = '<span class="x-f-description-uri">'
54 + '[<a target="_self" href="'
55 + ot + '" title="Description: &lt;' + ot
56 + '&gt;">D</a>]</span> ' + el.innerHTML;
57 }
58 i += 2;
59 }
60 } else if (el.tagName == "IMG") {
61 var eladd = '';
62 if (el.longdesc) {
63 var ot = replace_specials (el.longdesc);
64 if (el.parentElement.tagName == "A") {
65 eladd += ' <span class="x-f-description-uri">'
66 + '[<span title="Description: &lt;'
67 + ot + '&gt;">D: &lt;' + ot + '&gt;</span>]</span>';
68 } else {
69 eladd += ' <span class="x-f-description-uri">'
70 + '[<a target="_self" href="' + ot
71 + '" title="Description: &lt;' + ot + '&gt;">D</a>]</span>';
72 }
73 i += 2;
74 }
75 if (el.useMap) {
76 var ot = replace_specials (el.useMap);
77 if (el.parentElement.tagName == "A") {
78 eladd += ' <span class="x-f-description-uri">'
79 + '[<span title="Client-side image map: &lt;'
80 + ot + '&gt;">MAP: &lt;' + ot + '&gt;</span>]</span>';
81 } else {
82 eladd += ' <span class="x-f-description-uri">'
83 + '[<a target="_self" href="' + ot
84 + '" title="Client-side image map: &lt;'
85 + ot + '&gt;">MAP</a>]</span>';
86 }
87 i += 2;
88 }
89 if (el.isMap)
90 eladd += ' <span class="x-f-description-uri"'
91 + ' title="Server-side image map">[MAP]</span>';
92 if (eladd) el.outerHTML += eladd;
93 } else if (el.tagName == "TABLE") {
94 if (el.summary != null) {
95 if (el.title) el.title += ' ';
96 el.title += 'Table summary: ' + el.summary;
97 }
98 }
99 }
100 function replace_specials (rt) {
101 rt = rt.replace(/&/g,'&amp;');
102 rt = rt.replace(/</g,'&lt;');
103 rt = rt.replace(/>/g,'&gt;');
104 return rt;
105 }
106 </script>
107 <!--
108 Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>.
109
110 This program is free software; you can redistribute it and/or modify
111 it under the terms of the GNU General Public License as published by
112 the Free Software Foundation; either version 2 of the License, or
113 (at your option) any later version.
114
115 This program is distributed in the hope that it will be useful,
116 but WITHOUT ANY WARRANTY; without even the implied warranty of
117 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118 GNU General Public License for more details.
119
120 You should have received a copy of the GNU General Public License
121 along with this program; see the file COPYING. If not, write to
122 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
123 Boston, MA 02111-1307, USA.
124
125 $Date: 2002/05/25 21:52:20 $
126 -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24