mirror of
https://github.com/rkd77/elinks.git
synced 2025-09-21 19:46:23 -04:00
goto_url_hook takes 2 params not 1. Some dumbprefixes defined in hooks.py
This commit is contained in:
@@ -1,5 +1,31 @@
|
||||
def goto_url_hook(url):
|
||||
return None
|
||||
dumbprefixes = {
|
||||
"7th" : "http://7thguard.net/",
|
||||
"b" : "http://babelfish.altavista.com/babelfish/tr",
|
||||
"bz" : "http://bugzilla.elinks.cz",
|
||||
"bug" : "http://bugzilla.elinks.cz",
|
||||
"d" : "http://www.dict.org",
|
||||
"g" : "http://www.google.com/",
|
||||
"gg" : "http://www.google.com/",
|
||||
"go" : "http://www.google.com/",
|
||||
"fm" : "http://www.freshmeat.net/",
|
||||
"sf" : "http://www.sourceforge.net/",
|
||||
"dbug" : "http://bugs.debian.org/",
|
||||
"dpkg" : "http://packages.debian.org/",
|
||||
"pycur" : "http://www.python.org/doc/current/",
|
||||
"pydev" : "http://www.python.org/dev/doc/devel/",
|
||||
"pyhelp" : "http://starship.python.net/crew/theller/pyhelp.cgi",
|
||||
"pyvault" : "http://www.vex.net/parnassus/",
|
||||
"e2" : "http://www.everything2.org/",
|
||||
"sd" : "http://www.slashdot.org/"
|
||||
}
|
||||
|
||||
def goto_url_hook(url, current_url):
|
||||
global dumbprefixes
|
||||
|
||||
if dumbprefixes.has_key(url):
|
||||
return dumbprefixes[url];
|
||||
else:
|
||||
return None
|
||||
|
||||
def follow_url_hook(url):
|
||||
return None
|
||||
|
Reference in New Issue
Block a user