Refining the Google site hint
This commit is contained in:
parent
a684f006b6
commit
f802ff65ce
1 changed files with 3 additions and 3 deletions
|
|
@ -156,9 +156,9 @@
|
||||||
'003065520604945464838:izzukx8-qba', customSearchOptions);
|
'003065520604945464838:izzukx8-qba', customSearchOptions);
|
||||||
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
|
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
|
||||||
customSearchControl.draw('cse');
|
customSearchControl.draw('cse');
|
||||||
var path = window.location.pathname.split('/').slice(0,3);
|
var path = window.location.pathname.split('/').slice(0,4);
|
||||||
if(window.location.hostname && path.length >= 3) {
|
if(window.location.hostname && path.length >= 4) {
|
||||||
var site = "site:" + window.location.hostname + '/' + path.join('/').toString();
|
var site = "site:" + window.location.hostname + path.join('/').toString();
|
||||||
customSearchControl.setSearchStartingCallback(this, function(c, s, q) { s.setQueryAddition(site); });
|
customSearchControl.setSearchStartingCallback(this, function(c, s, q) { s.setQueryAddition(site); });
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue