How do i set the XPath to a Grease Monkey script
//Beautifying all the links....
var allLinks, thisLink;
allLinks = document.evaluate(
'//a[@href=starts-with(name(),www.elakiri.com)]', //a[@href=contains(name(),'www.elakiri.com')] ////a[@href] //*[starts-with(name(),'B')]
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allLinks.snapshotLength; i++) {
thisLink = allLinks.snapshotItem(i);
//removing all the underlines
thisLink.style.textDecoration = 'none';
}
This small script will underline all the links in any web page, but I want to do this to a specific website as mentioned. How do I do that, some people say that I need to use XPath but I do not have any experience on XPath. Please give me a clue.