Original issue 9 created by tiziano.m on 2008-07-29T08:20:57.000Z:
I've written down a few lines to make the bookmark color function work
again. I hope the developer will include it in the next update. I've also
posted it in the forum. Here there are the 3 functions to change:
[code]
function isBookmarksUrl(href) {
return href.search(/bookmarks.aspx/i) > -1;
}
function bookmarkColor(inputObj, regexp, spanObj, color) {
//Modified by Taised for aspx page: inputObj is the button with the img,
spanObj is the object with the comment
if (spanObj.firstChild.nodeValue.search(regexp) > -1) {
inputObj.src = "chrome://foxtrick/content/resources/notes/" + color +
".png";
spanObj.firstChild.nodeValue =
spanObj.firstChild.nodeValue.replace(regexp, "");
}
}
function bookmarksAdjustment(doc) {
//Modified by Taised
if (!isBookmarksUrl(doc.location.href)) return;
addStyleSheet(doc, "chrome://foxtrick/content/resources/css/bookmark_
comments.css");
var tableObj=doc.getElementById('ctl00_ctl00_CM_CI_repB');
tableObj=tableObj.childNodes[1];
for (var i=0; i<tableObj.rows.length; i++) {
//If there aren't 4 cells on the row is a separator row
if (tableObj.rows[i].cells.length==4) {
//if the first cell has 6 childs the row has comments
if (tableObj.rows[i].cells[0].childNodes.length>5) {
var spanObj=tableObj.rows[i].cells[0].childNodes[5];
var inputObj=tableObj.rows[i].cells[2].childNodes[1];
bookmarkColor(inputObj, /[aqua]/i, spanObj, "aqua");
bookmarkColor(inputObj, /[black]/i, spanObj, "black");
bookmarkColor(inputObj, /[blue]/i, spanObj, "blue");
bookmarkColor(inputObj, /[brown]/i, spanObj, "brown");
bookmarkColor(inputObj, /[darkpurple]/i, spanObj,
"darkpurple");
bookmarkColor(inputObj, /[green]/i, spanObj, "green");
bookmarkColor(inputObj, /[lightblue]/i, spanObj,
"lightblue");
bookmarkColor(inputObj, /[lightgreen]/i, spanObj,
"lightgreen");
bookmarkColor(inputObj, /[orange]/i, spanObj, "orange");
bookmarkColor(inputObj, /[pink]/i, spanObj, "pink");
bookmarkColor(inputObj, /[purple]/i, spanObj, "purple");
bookmarkColor(inputObj, /[red]/i, spanObj, "red");
bookmarkColor(inputObj, /[white]/i, spanObj, "white");
bookmarkColor(inputObj, /[yellow]/i, spanObj, "yellow");
}
}
}
}
[/code]