Project

General

Profile

[script] Context Menu Search v0.3.1 » Context Menu Search v0.1.1.ini

Mr. BS, 05/06/2014 07:02 PM

 
1
; http://dev.adiirc.com/boards/5/topics/181
2
; Context Menu Search
3
; v0.1.1 by pereba
4

    
5
alias -l maxchars { return 200 }
6

    
7
menu channel,query,status {
8
  -
9
  Search for " $+ $left($cb(1),$maxchars) $+ "
10
  .Amazon:run http://www.amazon.com/s?field-keywords= $+ $sp($cb(1))
11
  .Bing:run http://www.bing.com/search?q= $+ $sp($cb(1))
12
  .DuckDuckGo: run https://duckduckgo.com/?q= $+ $sp($cb(1))
13
  .Ebay:run http://www.ebay.com/sch/i.html?_nkw= $+ $sp($cb(1))
14
  .Firefox Addons: run https://addons.mozilla.org/en-US/firefox/search?q= $+ $sp($cb(1)) $+ &cat=all
15
  .Google:run https://www.google.com/?#q= $+ $sp($cb(1))
16
  .Google Images:run https://www.google.com/search?tbm=isch&q= $+ $sp($cb(1))
17
  .Grooveshark: run http://grooveshark.com/#/search?q= $+ $sp($cb(1))
18
  .Hawkee:run http://hawkee.com/search/ $+ $sp($cb(1)) $+ /
19
  .Metacritic:run http://www.metacritic.com/search/all/ $+ $sp($cb(1)) $+ /results
20
  .Reddit:run http://www.reddit.com/search?q= $+ $sp($cb(1))
21
  .Start Page:run https://startpage.com/do/search/?query= $+ $sp($cb(1))
22
  .Twitter:run https://twitter.com/search?q= $+ $sp($cb(1))
23
  .Urban Dictionary:run http://www.urbandictionary.com/define.php?term= $+ $sp($cb(1))
24
  .-
25
  .Torrents
26
  ..The Pirate Bay:run http://thepiratebay.se/search/ $+ $sp($cb(1)) $+ /0/99/0
27
  .Movies
28
  ..IMDB:run http://www.imdb.com/find?q= $+ $sp($cb(1)) $+ &s=all
29
  ..Rotten Tomatoes:run http://www.rottentomatoes.com/search/?search= $+ $sp($cb(1))
30
  ..TMDb:run http://www.themoviedb.org/search?query= $+ $sp($cb(1))
31
  .Videos
32
  ..Youtube:run http://www.youtube.com/results?search_query= $+ $sp($cb(1))
33
  ..LiveLeak:run http://www.liveleak.com/browse?q= $+ $sp($cb(1))
34
  -
35
}
36

    
37
on &*:INPUT:#: {
38
  if ($ctrlenter) { return }
39
  
40
  if ($1 == /am) { if (!$2) && (!$cb(1)) { halt } run http://www.amazon.com/s?field-keywords= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
41
  if ($1 == /bi) { if (!$2) && (!$cb(1)) { halt } run http://www.bing.com/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
42
  if ($1 == /du) { if (!$2) && (!$cb(1)) { halt } run https://duckduckgo.com/?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
43
  if ($1 == /e) { if (!$2) && (!$cb(1)) { halt } run http://www.ebay.com/sch/i.html?_nkw= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
44
  if ($1 == /f) { if (!$2) && (!$cb(1)) { halt } run https://addons.mozilla.org/en-US/firefox/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) $+ &cat=all | halt }
45
  if ($1 == /g) { if (!$2) && (!$cb(1)) { halt } run https://www.google.com/?#q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
46
  if ($1 == /gi) { if (!$2) && (!$cb(1)) { halt } run https://www.google.com/search?tbm=isch&q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
47
  if ($1 == /groo) { if (!$2) && (!$cb(1)) { halt } run http://grooveshark.com/#/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
48
  if ($1 == /h) { if (!$2) && (!$cb(1)) { halt } run http://hawkee.com/search/ $+ $iif($2,$sp($2-),$sp($cb(1))) $+ / | halt }
49
  if ($1 == /m) { if (!$2) && (!$cb(1)) { halt } run http://www.metacritic.com/search/all/ $+ $iif($2,$sp($2-),$sp($cb(1))) $+ /results | halt }
50
  if ($1 == /re) { if (!$2) && (!$cb(1)) { halt } run http://www.reddit.com/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
51
  if ($1 == /sp) { if (!$2) && (!$cb(1)) { halt } run https://startpage.com/do/search/?query= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
52
  if ($1 == /tw) { if (!$2) && (!$cb(1)) { halt } run https://twitter.com/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
53
  if ($1 == /ub) { if (!$2) && (!$cb(1)) { halt } run http://www.urbandictionary.com/define.php?term= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
54
  if ($1 == /pi) { if (!$2) && (!$cb(1)) { halt } run http://thepiratebay.se/search/ $+ $iif($2,$sp($2-),$sp($cb(1))) $+ /0/99/0 | halt }
55
  if ($1 == /im) { if (!$2) && (!$cb(1)) { halt } run http://www.imdb.com/find?q= $+ $iif($2,$sp($2-),$sp($cb(1))) $+ &s=all | halt }
56
  if ($1 == /rt) { if (!$2) && (!$cb(1)) { halt } run http://www.rottentomatoes.com/search/?search= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
57
  if ($1 == /tm) { if (!$2) && (!$cb(1)) { halt } run http://www.themoviedb.org/search?query= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
58
  if ($1 == /y) { if (!$2) && (!$cb(1)) { halt } run http://www.youtube.com/results?search_query= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
59
  if ($1 == /ll) { if (!$2) && (!$cb(1)) { halt } run http://www.liveleak.com/browse?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
60
  
61
  if (/* iswm $1) { return }
62
}
63

    
64
; replace space by +
65
alias -l sp {
66
  return $regsubex($1-,/(\s)/g, $chr(43))
67
}
68

    
69
; replace space by %20
70
alias -l sp2 {
71
  return $regsubex($1-,/(\s)/g, % $+ 20)
72
}
(3-3/8)