sidonath (owner)

Revisions

  • 0fffd5 Damir Z... Wed Feb 04 02:49:05 -0800 2009
  • 8e6c53 Damir Z... Fri Jan 30 17:08:06 -0800 2009
  • 922e8b Damir Z... Fri Jan 30 16:57:53 -0800 2009
  • 3b6f5f Damir Z... Fri Jan 30 16:53:24 -0800 2009
  • 4cdf0b sidonath Fri Jan 30 16:03:41 -0800 2009
gist: 55364 Download_button fork
public
Public Clone URL: git://gist.github.com/55364.git
Embed All Files: show embed
search.user.js #
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// ==UserScript==
// @name twitter Search v2
// @namespace http://z3c.info/
// @description Adds a search field to the Twitter interface
// @include http://twitter.com/home
// ==/UserScript==
 
// Twitter Search script
// version 0.3
// 2009-01-31
// Copyright (c) 2008, Dash Labs
// Author David Stone - http://twitter.com/builtbydave
// Author Josh Russell - http://twitter.com/joshr
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// Last modification by Damir Zekic:
// - Rewritten the script to use jQuery
// - Added class 'last' to the main div (to display top border)
// - Increased the size of search box by shrinking the "Search" (now "Go")
// button
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Twitter Search", and click Uninstall.
//
// --------------------------------------------------------------------
//
 
$ = unsafeWindow.jQuery;
 
$('div.section.last').eq(0)
  .before(
    $('<div/>')
      .addClass('section')
      .addClass('last')
      .append(
        $('<div/>')
          .addClass('section-header')
          .append(
            $('<a/>')
              .attr('href', 'http://search.twitter.com/advanced')
              .addClass('section-links')
              .text('advanced'))
          .append(
            $('<h1/>')
              .text('Search')))
      .append(
        $('<form/>')
          .attr('action', 'http://search.twitter.com/search')
          .attr('id', 'searchForm')
          .attr('method', 'get')
          .attr('name', 'searchForm')
          .append(
            $('<div/>')
              .attr('id', 'searchEntry')
              .append(
                $('<input/>')
                  .attr('id', 'searchBox')
                  .attr('name', 'q')
                  .attr('autosave', 'com.twitter.search')
                  .attr('size', 14)
                  .attr('placeholder', 'Enter your query')
                  .attr('results', 10)
                  .attr('type', 'search'))
              .append(
                $('<input/>')
                  .attr('type', 'submit')
                  .attr('value', 'Go')
                  .css('margin', '0 0 0 13px')
                  .css('vertical-align', 'middle')))));