am cbac1239: am c80298b0: am 557528a1: am 3f5fee62: am c942e879: fix sac search
* commit 'cbac12396a0b4081f579d6eb8342bbb5b68bdbfc': fix sac search
This commit is contained in:
commit
37a14b15e9
|
@ -1858,74 +1858,33 @@ function loadSearchResults() {
|
|||
searchOptions = new google.search.SearcherOptions();
|
||||
searchOptions.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
|
||||
|
||||
if(window.location.host=="source.android.com"){
|
||||
// Configure s.a.c searchers
|
||||
sacSiteSearcher = new google.search.WebSearch();
|
||||
sacSiteSearcher.setUserDefinedLabel("All");
|
||||
sacSiteSearcher.setSiteRestriction("http://source.android.com/");
|
||||
// Configure s.a.c searchers
|
||||
sacSiteSearcher = new google.search.WebSearch();
|
||||
sacSiteSearcher.setUserDefinedLabel("All");
|
||||
sacSiteSearcher.setSiteRestriction("http://source.android.com/");
|
||||
|
||||
sourceSearcher = new google.search.WebSearch();
|
||||
sourceSearcher.setUserDefinedLabel("Source");
|
||||
sourceSearcher.setSiteRestriction("http://source.android.com/source/");
|
||||
sourceSearcher = new google.search.WebSearch();
|
||||
sourceSearcher.setUserDefinedLabel("Source");
|
||||
sourceSearcher.setSiteRestriction("http://source.android.com/source/");
|
||||
|
||||
devicesSearcher = new google.search.WebSearch();
|
||||
devicesSearcher.setUserDefinedLabel("Devices");
|
||||
devicesSearcher.setSiteRestriction("http://source.android.com/devices/");
|
||||
devicesSearcher = new google.search.WebSearch();
|
||||
devicesSearcher.setUserDefinedLabel("Devices");
|
||||
devicesSearcher.setSiteRestriction("http://source.android.com/devices/");
|
||||
|
||||
accessoriesSearcher = new google.search.WebSearch();
|
||||
accessoriesSearcher.setUserDefinedLabel("Accessories");
|
||||
accessoriesSearcher.setSiteRestriction("http://source.android.com/accessories/");
|
||||
accessoriesSearcher = new google.search.WebSearch();
|
||||
accessoriesSearcher.setUserDefinedLabel("Accessories");
|
||||
accessoriesSearcher.setSiteRestriction("http://source.android.com/accessories/");
|
||||
|
||||
compatibilitySearcher = new google.search.WebSearch();
|
||||
compatibilitySearcher.setUserDefinedLabel("Compatibility");
|
||||
compatibilitySearcher.setSiteRestriction("http://source.android.com/compatibility/");
|
||||
compatibilitySearcher = new google.search.WebSearch();
|
||||
compatibilitySearcher.setUserDefinedLabel("Compatibility");
|
||||
compatibilitySearcher.setSiteRestriction("http://source.android.com/compatibility/");
|
||||
|
||||
// add each searcher to the search control
|
||||
searchControl.addSearcher(sacSiteSearcher, searchOptions);
|
||||
searchControl.addSearcher(sourceSearcher, searchOptions);
|
||||
searchControl.addSearcher(devicesSearcher, searchOptions);
|
||||
searchControl.addSearcher(accessoriesSearcher, searchOptions);
|
||||
searchControl.addSearcher(compatibilitySearcher, searchOptions);
|
||||
}
|
||||
else{
|
||||
// configure each of the searchers, for each tab
|
||||
devSiteSearcher = new google.search.WebSearch();
|
||||
devSiteSearcher.setUserDefinedLabel("All");
|
||||
devSiteSearcher.setSiteRestriction("001482626316274216503:zu90b7s047u");
|
||||
|
||||
designSearcher = new google.search.WebSearch();
|
||||
designSearcher.setUserDefinedLabel("Design");
|
||||
designSearcher.setSiteRestriction("http://developer.android.com/design/");
|
||||
|
||||
trainingSearcher = new google.search.WebSearch();
|
||||
trainingSearcher.setUserDefinedLabel("Training");
|
||||
trainingSearcher.setSiteRestriction("http://developer.android.com/training/");
|
||||
|
||||
guidesSearcher = new google.search.WebSearch();
|
||||
guidesSearcher.setUserDefinedLabel("Guides");
|
||||
guidesSearcher.setSiteRestriction("http://developer.android.com/guide/");
|
||||
|
||||
referenceSearcher = new google.search.WebSearch();
|
||||
referenceSearcher.setUserDefinedLabel("Reference");
|
||||
referenceSearcher.setSiteRestriction("http://developer.android.com/reference/");
|
||||
|
||||
googleSearcher = new google.search.WebSearch();
|
||||
googleSearcher.setUserDefinedLabel("Google Services");
|
||||
googleSearcher.setSiteRestriction("http://developer.android.com/google/");
|
||||
|
||||
blogSearcher = new google.search.WebSearch();
|
||||
blogSearcher.setUserDefinedLabel("Blog");
|
||||
blogSearcher.setSiteRestriction("http://android-developers.blogspot.com");
|
||||
|
||||
// add each searcher to the search control
|
||||
searchControl.addSearcher(devSiteSearcher, searchOptions);
|
||||
searchControl.addSearcher(designSearcher, searchOptions);
|
||||
searchControl.addSearcher(trainingSearcher, searchOptions);
|
||||
searchControl.addSearcher(guidesSearcher, searchOptions);
|
||||
searchControl.addSearcher(referenceSearcher, searchOptions);
|
||||
searchControl.addSearcher(googleSearcher, searchOptions);
|
||||
searchControl.addSearcher(blogSearcher, searchOptions);
|
||||
}
|
||||
// add each searcher to the search control
|
||||
searchControl.addSearcher(sacSiteSearcher, searchOptions);
|
||||
searchControl.addSearcher(sourceSearcher, searchOptions);
|
||||
searchControl.addSearcher(devicesSearcher, searchOptions);
|
||||
searchControl.addSearcher(accessoriesSearcher, searchOptions);
|
||||
searchControl.addSearcher(compatibilitySearcher, searchOptions);
|
||||
|
||||
|
||||
// configure result options
|
||||
|
|
Loading…
Reference in New Issue