Team:Warsaw/Calendar-Main/NoAtribution

From 2008.igem.org

(Difference between revisions)
Line 163: Line 163:
                 //No proper titles
                 //No proper titles
-
                 else if(ans.search("<h3>")<0) document.getElementById("no_author").innerHTML=document.getElementById("no_author").innerHTML+"<br/><a href="+'"'+adresbase+nday+'"'+">"+nday+" No titles: "+get_author(ans)+"</a>";  
+
                 else if(ans.search("<h3>")<0) document.getElementById("no_author").innerHTML=document.getElementById("no_author").innerHTML+"<br/><a href="+'"'+adresbase+nday+'"'+">"+nday+" No titles: "+removeHTMLTags(get_author(ans))+"</a>";  
                 //no proper authors
                 //no proper authors
-
                 else if(ans.search("<h4>")<0) document.getElementById("no_author").innerHTML=document.getElementById("no_author").innerHTML+"<br/><a href="+'"'+adresbase+nday+'"'+">"+nday+" No authors:"+get_title(ans)+"</a>";
+
                 else if(ans.search("<h4>")<0) document.getElementById("no_author").innerHTML=document.getElementById("no_author").innerHTML+"<br/><a href="+'"'+adresbase+nday+'"'+">"+nday+" No authors:"+removeHTMLTags(get_title(ans))+"</a>";
                   else if (and(count_authors(ans)==count_titles(ans),count_authors(ans)>0))
                   else if (and(count_authors(ans)==count_titles(ans),count_authors(ans)>0))
Line 173: Line 173:
                   if(ans.search("<h4>"+authors[i])>0) {
                   if(ans.search("<h4>"+authors[i])>0) {
-
document.getElementById(authors[i]).innerHTML=document.getElementById(authors[i]).innerHTML+"<br/><a href="+'"'+adresbase+nday+'"'+">"+nday+": "+get_title_by_author(ans,authors[i])+"</a>";
+
document.getElementById(authors[i]).innerHTML=document.getElementById(authors[i]).innerHTML+"<br/><a href="+'"'+adresbase+nday+'"'+">"+nday+": "+removeHTMLTags(get_title_by_author(ans,authors[i]))+"</a>";
                  
                  
                       }
                       }
Line 284: Line 284:
return null;
return null;
 +
}
 +
 +
function removeHTMLTags(strInputCode ){
 +
 +
strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
 +
return (p1 == "lt")? "<" : ">";
 +
});
 +
var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
 +
return strTagStrippedText;
 +
}
}

Revision as of 17:23, 12 October 2008

Gallery Bricks Notebook Team Project Home

Attribution analyzer

Start dateEnd date

Michał K. Michał L. Piotr Antoni Paweł Errors