|
; http://dev.adiirc.com/boards/5/topics/181
|
|
; Context Menu Search
|
|
; v0.1.1 by pereba
|
|
|
|
alias -l maxchars { return 200 }
|
|
|
|
menu channel,query,status {
|
|
-
|
|
Search for " $+ $left($cb(1),$maxchars) $+ "
|
|
.Amazon:run http://www.amazon.com/s?field-keywords= $+ $sp($cb(1))
|
|
.Bing:run http://www.bing.com/search?q= $+ $sp($cb(1))
|
|
.DuckDuckGo: run https://duckduckgo.com/?q= $+ $sp($cb(1))
|
|
.Ebay:run http://www.ebay.com/sch/i.html?_nkw= $+ $sp($cb(1))
|
|
.Firefox Addons: run https://addons.mozilla.org/en-US/firefox/search?q= $+ $sp($cb(1)) $+ &cat=all
|
|
.Google:run https://www.google.com/?#q= $+ $sp($cb(1))
|
|
.Google Images:run https://www.google.com/search?tbm=isch&q= $+ $sp($cb(1))
|
|
.Grooveshark: run http://grooveshark.com/#/search?q= $+ $sp($cb(1))
|
|
.Hawkee:run http://hawkee.com/search/ $+ $sp($cb(1)) $+ /
|
|
.Metacritic:run http://www.metacritic.com/search/all/ $+ $sp($cb(1)) $+ /results
|
|
.Reddit:run http://www.reddit.com/search?q= $+ $sp($cb(1))
|
|
.Start Page:run https://startpage.com/do/search/?query= $+ $sp($cb(1))
|
|
.Twitter:run https://twitter.com/search?q= $+ $sp($cb(1))
|
|
.Urban Dictionary:run http://www.urbandictionary.com/define.php?term= $+ $sp($cb(1))
|
|
.-
|
|
.Torrents
|
|
..The Pirate Bay:run http://thepiratebay.se/search/ $+ $sp($cb(1)) $+ /0/99/0
|
|
.Movies
|
|
..IMDB:run http://www.imdb.com/find?q= $+ $sp($cb(1)) $+ &s=all
|
|
..Rotten Tomatoes:run http://www.rottentomatoes.com/search/?search= $+ $sp($cb(1))
|
|
..TMDb:run http://www.themoviedb.org/search?query= $+ $sp($cb(1))
|
|
.Videos
|
|
..Youtube:run http://www.youtube.com/results?search_query= $+ $sp($cb(1))
|
|
..LiveLeak:run http://www.liveleak.com/browse?q= $+ $sp($cb(1))
|
|
-
|
|
}
|
|
|
|
on &*:INPUT:#: {
|
|
if ($ctrlenter) { return }
|
|
|
|
if ($1 == /am) { if (!$2) && (!$cb(1)) { halt } run http://www.amazon.com/s?field-keywords= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /bi) { if (!$2) && (!$cb(1)) { halt } run http://www.bing.com/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /du) { if (!$2) && (!$cb(1)) { halt } run https://duckduckgo.com/?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
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 }
|
|
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 }
|
|
if ($1 == /g) { if (!$2) && (!$cb(1)) { halt } run https://www.google.com/?#q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
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 }
|
|
if ($1 == /groo) { if (!$2) && (!$cb(1)) { halt } run http://grooveshark.com/#/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /h) { if (!$2) && (!$cb(1)) { halt } run http://hawkee.com/search/ $+ $iif($2,$sp($2-),$sp($cb(1))) $+ / | halt }
|
|
if ($1 == /m) { if (!$2) && (!$cb(1)) { halt } run http://www.metacritic.com/search/all/ $+ $iif($2,$sp($2-),$sp($cb(1))) $+ /results | halt }
|
|
if ($1 == /re) { if (!$2) && (!$cb(1)) { halt } run http://www.reddit.com/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /sp) { if (!$2) && (!$cb(1)) { halt } run https://startpage.com/do/search/?query= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /tw) { if (!$2) && (!$cb(1)) { halt } run https://twitter.com/search?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /ub) { if (!$2) && (!$cb(1)) { halt } run http://www.urbandictionary.com/define.php?term= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /pi) { if (!$2) && (!$cb(1)) { halt } run http://thepiratebay.se/search/ $+ $iif($2,$sp($2-),$sp($cb(1))) $+ /0/99/0 | halt }
|
|
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 }
|
|
if ($1 == /rt) { if (!$2) && (!$cb(1)) { halt } run http://www.rottentomatoes.com/search/?search= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /tm) { if (!$2) && (!$cb(1)) { halt } run http://www.themoviedb.org/search?query= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /y) { if (!$2) && (!$cb(1)) { halt } run http://www.youtube.com/results?search_query= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
if ($1 == /ll) { if (!$2) && (!$cb(1)) { halt } run http://www.liveleak.com/browse?q= $+ $iif($2,$sp($2-),$sp($cb(1))) | halt }
|
|
|
|
if (/* iswm $1) { return }
|
|
}
|
|
|
|
; replace space by +
|
|
alias -l sp {
|
|
return $regsubex($1-,/(\s)/g, $chr(43))
|
|
}
|
|
|
|
; replace space by %20
|
|
alias -l sp2 {
|
|
return $regsubex($1-,/(\s)/g, % $+ 20)
|
|
}
|