github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

drnic / ninja-search-js

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 10
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (1)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

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. — Read more

  cancel

http://drnic.github.com/ninja-search-js/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

bumped website 
drnic (author)
Mon Jun 08 02:35:49 -0700 2009
commit  9ebdd76a4383794b7a1c64865bfdb46ad5c701b8
tree    96f49b64188df1683ee8c00f766f87df1442aa0d
parent  710d2659a55eb3291281896ee9595e55333bb070
ninja-search-js / public / ninja-search.dev.user.js public/ninja-search.dev.user.js
100644 48 lines (42 sloc) 1.743 kb
edit raw blame history
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// ==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==
 
// THIS FILE IS FOR LOCAL DEV TESTING
// It loads the public/*.js files individual so no `rake build` is required
// The project must be mounted as http://ninja-search-js.local
// I do this using Passenger (drop project folder into Passenger PrefPane)
// The ninja-search.user.js file contains the public url for downloading scripts and assets
 
(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("media", "screen");
    style.setAttribute("href", "http://ninja-search-js.local/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() {
    if (typeof jQuery === "undefined" || jQuery === null) {
      require("http://ninja-search-js.local/jquery.js");
      var script = document.createElement("script");
      script.innerHTML = "jQuery.noConflict();";
      head.appendChild(script);
    }
    require("http://ninja-search-js.local/liquidmetal.js");
    require("http://ninja-search-js.local/jquery.flexselect.js");
    require("http://ninja-search-js.local/ninja_search.js");
  };
  
  flexselect_theme();
  load_latest_ninja_search();
})();
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server