Hilfe für ein Greasemonkey Script für EndnoteWeb

Cool.

Ich habe aber doch noch mal eine Frage. in folgendem Fall funktioniert es leider nicht:

HTML:
<tr><td valign="top">Author:</td>
<td valign="top">
		
		<nobr><a href="./EndNoteWeb.html?selectedFolderId=0&amp;searchItem=Alghazo,%20Emad%20M.&amp;searchField=all&amp;authorflag=1&amp;" title="Search for this author in all my references"><font color="#ff0000">Alghazo,</font> <font color="#ff0000">Emad</font> <font color="#ff0000">M.</font></a>;</nobr>

		
		<nobr><a href="./EndNoteWeb.html?selectedFolderId=0&amp;searchItem=Naggar%20Gaad,%20Eman%20El&amp;searchField=all&amp;authorflag=1&amp;" title="Search for this author in all my references"> Naggar Gaad, Eman El</a></nobr>
</td>
</tr>


<tr><td valign="top">Title:</td>
<td valign="top">
          General Education Teachers in the United Arab Emirates and Their Acceptance of the Inclusion of Students with Disabilities
</td>
</tr>

Also wenn zwei (oder mehr Autoren auftauchen.
Hast Du da noch einen Tipp wie eine Lösung für zwei (oder mehr) Autoren aussehen könnte?
Danke
C.
 
Das ginge so :)
Javascript:
function GM_DM_ENW1()
{
  
  this.strip_tags=function(s)
    {
      var e=document.createElement('div');
      e.innerHTML=s.replace(/<[^>]+>/g,' ');
      return e.firstChild.data;
    }

  if(String(document.body.innerHTML).match(/<td valign="top">Author:<\/td>\s*<td valign="top">([\s\S]+)<\/td>\s*<\/tr>\s*<tr><td valign="top">Title:<\/td>\s+<td valign="top">([\s\S]+)<\/td>\s*<\/tr>\s*<tr>\s*<td valign="top">Year:/g))
    {
      this.author=RegExp.$1;
      this.title=RegExp.$2;
      
      document.title=String('['+this.strip_tags(this.author)+']:'+this.strip_tags(this.title)).replace(/\s+/g,' ');
    }
}
new GM_DM_ENW1();
 
Zurück