Skip to content

Instantly share code, notes, and snippets.

@ootput
Created April 8, 2015 10:17
Show Gist options
  • Select an option

  • Save ootput/4c19e20103e6fb80ffe7 to your computer and use it in GitHub Desktop.

Select an option

Save ootput/4c19e20103e6fb80ffe7 to your computer and use it in GitHub Desktop.
form.js diff for usable search
@@ -12,7 +12,7 @@ function searchFormHelper(options){
return '<form action="//google.com/search" method="get" accept-charset="UTF-8" class="' + className + '">' +
'<input type="search" name="q" results="0" class="' + className + '-input"' + (text ? ' placeholder="' + text + '"' : '') + '>' +
(button ? '<button type="submit" class="' + className + '-submit">' + (typeof button === 'string' ? button : text) + '</button>' : '') +
- '<input type="hidden" name="q" value="site:' + config.url + '">' +
+ '<input type="hidden" name="sitesearch" value="' + config.url + '">' +
'</form>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment