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: <<a target="_self" href="'
|
17 |
|
|
+ ot + '">' + ot + '</a>></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: <' + ot + '></span>'
|
27 |
|
|
+ el.innerHTML;
|
28 |
|
|
i += 1;
|
29 |
|
|
} else {
|
30 |
|
|
el.innerHTML = '<span class="x-f-citation-uri">'
|
31 |
|
|
+ 'Source: <<a target="_self" href="'
|
32 |
|
|
+ ot + '">' + ot + '</a>></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: <'
|
47 |
|
|
+ ot + '>">D: <' + ot + '></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: <' + ot
|
53 |
|
|
+ '>">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: <'
|
64 |
|
|
+ ot + '>">D: <' + ot + '></span>]</span>';
|
65 |
|
|
} else {
|
66 |
|
|
eladd += ' <span class="x-f-description-uri">'
|
67 |
|
|
+ '[<a target="_self" href="' + ot
|
68 |
|
|
+ '" title="Description: <' + ot + '>">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: <'
|
77 |
|
|
+ ot + '>">MAP: <' + ot + '></span>]</span>';
|
78 |
|
|
} else {
|
79 |
|
|
eladd += ' <span class="x-f-description-uri">'
|
80 |
|
|
+ '[<a target="_self" href="' + ot
|
81 |
|
|
+ '" title="Client-side image map: <'
|
82 |
|
|
+ ot + '>">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,'&');
|
99 |
|
|
rt = rt.replace(/</g,'<');
|
100 |
|
|
rt = rt.replace(/>/g,'>');
|
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 |
|
|
-->
|