Move favicon
|
|
I would like to have the favicon instead of the star because I use a particular style.
|
|
|
Maybe found it: /span[contains(@class,'entry-source-title')]
I changed the s.left.
|
|
|
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;}
]></>);
},
|
|
|
Works, thanks. |