Try this:
searchControl.setSearchStartingCallback(this,
function() {
var divs = document.getElementsByTagName('div');
for (var i=0, div; div = divs[i]; i++) {
if (/gsc-title/.test(div.className)) {
div.style.whiteSpace = 'nowrap';
var s = div.innerHTML;
s = s.replace(/Image/,
'Custom title for Image results');
s = s.replace(/Video/,
'Custom title for Video results');
div.innerHTML = s;
}
}
});
In that code, put your preferred titles in place of the
'Custom title for Image results' and
'Custom title for Video results'.
.
Experiment with these two samples:
http://code.google.com/apis/ajax/playground/?exp=search#site_restrict
http://code.google.com/apis/ajax/playground/?exp=search#youtube_feed
Edit those samples, and add the code shown above;
put it in the OnLoad function, anywhere between the
search control constructor call and the execute() call.
-- omr
--
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en.