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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by wakaba, Sat Mar 30 13:47:56 2002 UTC revision 1.1.1.1.2.2 by wakaba, Sun Apr 28 05:48:08 2002 UTC
# Line 9  var itext = '';  var mtext = ''; Line 9  var itext = '';  var mtext = '';
9  for (var i = 0; i < head.all.length; i++) {  for (var i = 0; i < head.all.length; i++) {
10    var el = head.all(i);  var tn = el.tagName;    var el = head.all(i);  var tn = el.tagName;
11    if (tn == 'LINK') {    if (tn == 'LINK') {
12      var Ahref = el.href;  var htext = '';      var Ahref = replace_specials (el.href);  var htext = '';
     Ahref = Ahref.replace(/&/g,'&amp;');  
     Ahref = Ahref.replace(/</g,'&lt;');  
     Ahref = Ahref.replace(/>/g,'&gt;');  
13      if (el.title) htext = el.title + ' ';      if (el.title) htext = el.title + ' ';
14      if (el.hreflang) htext += '{language=' + el.hreflang + '} ';      if (el.hreflang) htext += '{language=' + el.hreflang + '} ';
15      if (el.media) htext += '{media=' + el.media + '} ';      if (el.media) htext += '{media=' + el.media + '} ';
# Line 37  for (var i = 0; i < head.all.length; i++ Line 34  for (var i = 0; i < head.all.length; i++
34        mname += ' {' + mlang + '}';        mname += ' {' + mlang + '}';
35      }      }
36      if (mtitle) mtext += ' title="' + replace_specials (mtitle) + '"';      if (mtitle) mtext += ' title="' + replace_specials (mtitle) + '"';
37      mtext += '>' + replace_specials (mname);      if (el.scheme) mname += ' {scheme=' + el.scheme + '}';
38        mtext += '>' + replace_specials (mname) + ' ';
39      mtext += replace_specials (mvalue) + '</li>';      mtext += replace_specials (mvalue) + '</li>';
40    } else if (tn == 'TITLE') {    } else if (tn == 'TITLE') {
41      var mlang = el.lang;      var mlang = el.lang;
# Line 65  for (var i = 0; i < head.all.length; i++ Line 63  for (var i = 0; i < head.all.length; i++
63      mtext += '</li>';      mtext += '</li>';
64    }    }
65  }  }
66    
67    // profile attribute of HEAD element
68    var head = doc.getElementsByTagName('head').item(0);
69    if (head.outerHTML.indexOf ('profile=') > 0) {
70        var profileURI = head.outerHTML.replace (/^.+profile="?/, '');
71        profileURI = profileURI.replace (head.innerHTML, '');
72        profileURI = profileURI.replace (/"?[> ].+$/, '');
73        var Ahref = replace_specials (profileURI);
74        var htext = '';
75        if (head.title) htext = head.title + ' ';
76        htext += '(' + profileURI + ')';
77        var lrel = '[profile]';
78        itext += '<li class="x-f-link">';
79        itext += '<a href="' + Ahref + '" class="x-f-link-rel"'
80               + ' title="' + htext + '" target="_self">'
81               + lrel + '</a></li>';
82    }
83    
84  // insert  // insert
85  if (mtext) {  if (mtext) {
86    mtext = '<ins class="x-f-meta"><ul>' + mtext + '</ul></ins>';    mtext = '<ins class="x-f-meta"><ul>' + mtext + '</ul></ins>';
# Line 78  function replace_specials (rt) { Line 94  function replace_specials (rt) {
94    rt = rt.replace(/&/g,'&amp;');    rt = rt.replace(/&/g,'&amp;');
95    rt = rt.replace(/</g,'&lt;');    rt = rt.replace(/</g,'&lt;');
96    rt = rt.replace(/>/g,'&gt;');    rt = rt.replace(/>/g,'&gt;');
97      rt = rt.replace(/"/g,'&quot;');
98    return rt;    return rt;
99  }  }
100  </script>  </script>

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.2.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24