| 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 |
wakaba |
1.2 |
#name Show related URIs
|
| 6 |
wakaba |
1.1 |
#context default image table
|
| 7 |
wakaba |
1.2 |
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 |
wakaba |
1.1 |
-->
|
| 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: <<a target="_self" href="'
|
| 20 |
|
|
+ ot + '">' + ot + '</a>></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: <' + ot + '></span>'
|
| 30 |
|
|
+ el.innerHTML;
|
| 31 |
|
|
i += 1;
|
| 32 |
|
|
} else {
|
| 33 |
|
|
el.innerHTML = '<span class="x-f-citation-uri">'
|
| 34 |
|
|
+ 'Source: <<a target="_self" href="'
|
| 35 |
|
|
+ ot + '">' + ot + '</a>></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: <'
|
| 50 |
|
|
+ ot + '>">D: <' + ot + '></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: <' + ot
|
| 56 |
|
|
+ '>">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: <'
|
| 67 |
|
|
+ ot + '>">D: <' + ot + '></span>]</span>';
|
| 68 |
|
|
} else {
|
| 69 |
|
|
eladd += ' <span class="x-f-description-uri">'
|
| 70 |
|
|
+ '[<a target="_self" href="' + ot
|
| 71 |
|
|
+ '" title="Description: <' + ot + '>">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: <'
|
| 80 |
|
|
+ ot + '>">MAP: <' + ot + '></span>]</span>';
|
| 81 |
|
|
} else {
|
| 82 |
|
|
eladd += ' <span class="x-f-description-uri">'
|
| 83 |
|
|
+ '[<a target="_self" href="' + ot
|
| 84 |
|
|
+ '" title="Client-side image map: <'
|
| 85 |
|
|
+ ot + '>">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,'&');
|
| 102 |
|
|
rt = rt.replace(/</g,'<');
|
| 103 |
|
|
rt = rt.replace(/>/g,'>');
|
| 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 |
wakaba |
1.2 |
$Date: 2002/05/25 21:52:20 $
|
| 126 |
wakaba |
1.1 |
-->
|