I currently have a list of links to external web sites on a homepage in a summary web part view. These links include Google, the company's website, newspaper sites etc. Instead of the bullet point (square.gif) that Sharepoint uses, I want an actual logo of the website that it links to.
I have tried adding columns like 'type' but it just displays an image saying it links to another webpage, which I don't want.
I came across this thread: The very last answer looks like something I could use:
<script language="javascript" type="text/javascript">
var arrElements = document.getElementsByTagName("img");
for (var i=0; i<arrElements.length; i++) {
//get pointer each image element:
var element=arrElements[i];
//check for a source with /images/square.gif from this site:
if (element.getAttribute('src') ==
"http://www.MY-SITE-NAME.com/_layouts/images/square.gif") {
//found... change it's src to our new image:
element.setAttribute('src', 'http://www.MY-SITE-NAME.com/MY-LOCATION/MY-CUSTOM-BULLET.gif');
}
}
</script>
I need to change where it sets each point to the same picture, to javascript looking at each website and retrieving the logo thumbnail (something like the little picture in the tab at the top of the browsers).