change link colors from JavaScript?

M

mike

I'm writing a FireFox extension and I have the dom and therefor the
links[] collection

window.getBrowser().contentDocument.links

Is there a way to change the color of these links based on the stuff I'm
checking for from the JavaScript?

For example. If I have this loop
var number_of_links = window.getBrowser().contentDocument.links.length;

for (var i=0; i < number_of_links; i++)
{
var domain = window.getBrowser().contentDocument.links.hostname;
//Check hostname here and change color
}

how could I change the links color?

thanks
mike
 
F

Fred Oz

mike said:
I'm writing a FireFox extension and I have the dom and therefor the
links[] collection

window.getBrowser().contentDocument.links

Is there a way to change the color of these links based on the stuff I'm
checking for from the JavaScript?

For example. If I have this loop
var number_of_links = window.getBrowser().contentDocument.links.length;

for (var i=0; i < number_of_links; i++)
{
var domain = window.getBrowser().contentDocument.links.hostname;
//Check hostname here and change color
}

how could I change the links color?


Whilst this is a general ECMA/JavaScript/JScript news group, I
think Firefox extensions are a little outside the knowledge of
most posters here.

You may get quicker/better help here:

<URL:http://forums.mozillazine.org/viewforum.php?f=19>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top