File: search_form.rb

package info (click to toggle)
tdiary 5.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,092 kB
  • sloc: ruby: 23,031; javascript: 1,029; xml: 325; makefile: 26; sh: 2
file content (22 lines) | stat: -rw-r--r-- 870 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# search_form.rb English resource.

def google_form( button_name = "Google Search", size = 20, default_text = "" )
	first = %Q[<a href="https://www.google.com/">
		<img src="https://www.google.com/logos/Logo_40wht.gif"
			style="border-width: 0px; vertical-align: middle;" alt="Google"></a>]
	search_form( "https://www.google.com/search", "q", button_name, size, default_text, first, '' )
end

def yahoo_form( button_name = "Yahoo! Search", size = 20, default_text = "" )
	first = %Q[<a href="https://www.yahoo.com/">
		<img src="http://us.i1.yimg.com/us.yimg.com/i/yahootogo/ytg_search.gif"
			style="border-width: 0px; vertical-align: middle;" alt="[Yahoo!]"></a>]
	search_form( "https://search.yahoo.com/search", "p", button_name, size, default_text, first, "" )
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End: