Skip to content

Instantly share code, notes, and snippets.

@tobbez
Created November 6, 2010 13:18
Show Gist options
  • Save tobbez/665413 to your computer and use it in GitHub Desktop.
Save tobbez/665413 to your computer and use it in GitHub Desktop.
what.cd user script: Add button for each search field in toolbar
// ==UserScript==
// @name Add button for each search field in toolbar
// @namespace tobbez
// @include http*://*what.cd*
// ==/UserScript==
var sb = document.getElementById('searchbars');
var forms = sb.getElementsByTagName('form');
for (var i = 0; i < forms.length; ++i) {
var e = document.createElement('input');
e.type = 'submit';
e.value = 'Search';
forms[i].appendChild(e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment