Google Reader Favicon ++

By Yamamaya Last update Feb 2, 2011 — Installed 14,039 times.

Move favicon

in
Subscribe to Move favicon 4 posts, 2 voices



ozzii User

I would like to have the favicon instead of the star because I use a particular style.
How I can do it?
Or maybe you can tell me how I can do to move it to the left (with margin maybe)?

 
ozzii User

Maybe found it:

/span[contains(@class,'entry-source-title')]
title = target.firstChild.firstChild.nextSibling.nextSibling.firstChild.nextSibling;
s.position = "absolute";
s.top = "3px";
s.left = "0.6em";

I changed the s.left.
Is it OK like this ?

 
Yamamaya Script's Author

Maybe

entryFavicon: function(){
 	   document.addEventListener("DOMNodeInserted", function(e){
		  var target = e.target;
 		  if (target.className === "entry" | target.className === "entry read" | target.className === "entry read read-state-locked") {
 		    var title;
 			var icon = document.createElement("img");
 			var s = icon.style;		
 			s.width = "16px";
 			s.height = "16px";
		    if (target.firstChild.className == "card card-common") {
			   // 前文表示 .//span[@class='entry-source-title-parent']
			    title = target.firstChild.firstChild.firstChild.firstChild.firstChild.nextSibling.nextSibling.firstChild.firstChild;
                s.marginRight = "10px";
			    s.verticalAlign = "middle";
			}
			else {
			    var star = target.firstChild.firstChild;
				var starStyle = star.style;
				starStyle.visibility = "hidden";
			    // リスト表示 .//span[contains(@class,'entry-source-title')]
			    title = target.firstChild.firstChild.nextSibling.nextSibling.firstChild.nextSibling;
				s.position = "absolute";	
 			    s.top = "3px";
 			    s.left = "0.2em";				
				icon.addEventListener("mouseover",function(e){
				    s.visibility = "hidden";
					starStyle.visibility = "visible";
					e.preventDefault();
				},false);
				star.addEventListener("mouseout",function(e){
					starStyle.visibility = "hidden";
					s.visibility = "visible";
				    e.preventDefault();
				},false);			
			}
 			var match = title.textContent;
		    if(match.length > 24) match = match.substr(0,21) + '...';			

 			(xml.hasOwnProperty(match)) ? icon.src = xml[match] : icon.src = favicon_default_img;
 			title.parentNode.insertBefore(icon, title);
 			icon.removeEventListener("error", revertIcon, false);
 			icon.addEventListener("error", revertIcon, false);
			
			// colorful list view
			if(colorful_flag === true)
			 googleReader.colorfulListView.setColor(title,target);
 		  }
 	    }, false);		
	},

and

addBaseStyle: function(){
       GM_addStyle(<><![CDATA[  
          #entries.list .collapsed .entry-main .entry-source-title {
             width:9em !important;
          }
          #sub-tree ul ul li a {padding-left:22px !important;}
	  #sub-tree a img {width:16px; height:16px; border:none; vertical-align:middle;}
          #entries.list .collapsed .entry-secondary {margin: 0 8em 0 14em !important;}
          #entries.single-source .collapsed .entry-source-title {display:block !important;}
          .colorful-list-view-style {background: #C2CFF1;}
        ]></>);		
},
 
ozzii User

Works, thanks.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel