public
Description: Do long drop down lists make you want to send out an assassin and hunt down web developers? Then I have the ninja for you.
Homepage: http://drnic.github.com/ninja-search-js/
Clone URL: git://github.com/drnic/ninja-search-js.git
ninja-search-js / public / ninja-search.user.js
100644 33 lines (28 sloc) 1.013 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// ==UserScript==
// @name Ninja Search
// @namespace http://drnicwilliams.com/
// @description Instant autocompletion for any <select> drop downs on any page
// @include https://*
// @include http://*
// @version 1.0
// ==/UserScript==
 
(function() {
  var head = document.getElementsByTagName("head")[0];
  
  var flexselect_theme = function() {
    var style = document.createElement("link");
    style.setAttribute("type", "text/css");
    style.setAttribute("rel", "stylesheet");
    style.setAttribute("href", "http://drnic.github.com/ninja-search-js/dist/stylesheets/flexselect.css");
    head.appendChild(style);
  };
 
  var require = function(src) {
    var script = document.createElement("script");
    script.setAttribute("src", src);
    head.appendChild(script);
  };
  var load_latest_ninja_search = function() {
    require("http://drnic.github.com/ninja-search-js/dist/ninja_search_complete.js");
  };
  
  flexselect_theme();
  load_latest_ninja_search();
})();