Created
September 27, 2017 11:33
-
-
Save RiceeeChang/bddbbe31e1a442c2e523fd59bd9c3d49 to your computer and use it in GitHub Desktop.
Google Custom Search Engine always let search with "intitle:"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<gcse:searchresults-only gname="results"></gcse:searchresults-only> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var term = "search_term"; | |
var myCallback = function() { | |
if (document.readyState == 'complete') { | |
var searchResult = google.search.cse.element.getElement("results"); | |
searchResult.execute(term); | |
} else { | |
google.setOnLoadCallback(function() { | |
var searchResult = google.search.cse.element.getElement("results"); | |
searchResult.execute(term); | |
}, true); | |
} | |
}; | |
window.__gcse = { | |
parsetags: 'onload', | |
callback: myCallback | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment