/[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.1 - (hide annotations) (download) (as text)
Sat Mar 30 13:47:56 2002 UTC (22 years, 8 months ago) by wakaba
Branch: MAIN
Branch point for: wakaba
File MIME type: text/html
Initial revision

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24