96 Part II — Getting Inside Gmail
Listing 6-1(continued)
a.style.borderWidth=’2px’;
a.style.width=’10px’;
a.style.height=’10px’;
a.style.lineHeight=’10px’;
a.style.verticalAlign=’middle’;
a.style.textAlign=’center’;
a.style.fontSize=’x-small’;
a.style.fontWeight=’bold’;
a.style.position=’absolute’;
a.style.top=’0px’;
a.style.right=’0px’;
return a;
}
function addsubhtml_init(){
ul=document.getElementById(‘bloglines_subs’);
ul.innerHTML=’’;
if (!document.getElementById(‘bloglines_reload’)){
a=createbutton(‘R’);
a.addEventListener(‘click’,_getsubs,false);
a.id=’bloglines_reload’;
ul.parentNode.appendChild(a);
}
}
function addsubhtml(d){
ul=document.getElementById(‘bloglines_subs’);
li=document.createElement(‘li’);
li.className=’nl’;
li.style.padding=’0px’;
li.style.margin=’0px’;
li.style.width=’100%’;
li.style.overflow=’hidden’;
a=document.createElement(‘a’);
a.id=d[‘BloglinesSubId’];
a.href=’http://www.bloglines.com/myblogs_display?sub=’+d[‘Blog
linesSubId’]+’&site=0’;
a.target=’_blank’;
txt=d[‘title’]
a.style.fontSize=’small’;
if (d[‘BloglinesUnread’]>0){
a.style.fontWeight=’bold’;
txt=txt+” (“+d[‘BloglinesUnread’]+”)”;