var anchors = document.getElementsByTagName('a'),
l = anchors.length,
i,
a;
for (i = 0; i < l; i++) {
a = anchors[i];
if (a.href.indexOf('maps.google.com/maps?') !== -1) {
// here you can manipulate the anchor
a.title = '';
a.onclick = function () { return false; };
}
}
NOTE
Remember It's against the Google Maps API ToS to remove the Google branding or the ToS link.
I noted that changing the href is not desirable because every time the map is dragged or zoomed in/out, the href is set to a new value. So setting an event, as suggested in davcs86's answer, is the best approach.
You can take advantage of RobH's answer
NOTE
Remember It's against the Google Maps API ToS to remove the Google branding or the ToS link.
I noted that changing the href is not desirable because every time the map is dragged or zoomed in/out, the href is set to a new value. So setting an event, as suggested in davcs86's answer, is the best approach.
Here is the code:
I used onmousedown instead of onclick because it responds to the middle button.