1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
This commit is contained in:
Kalle Olavi Niemitalo 2006-01-01 19:05:44 +02:00 committed by Kalle Olavi Niemitalo
commit 345ba7afcd
173 changed files with 9353 additions and 3637 deletions

View File

@ -241,7 +241,7 @@ Jimenez Martinez Angel Luis <al026635@alumail.uji.es>
Jonas Fonseca <fonseca@diku.dk>
Maintainer
Danish translation
http://elinks.or.cz/
http://elinks.cz/
Mailcap support
Major cleanups
BFU and document management hacking
@ -442,7 +442,7 @@ Petr Baudis <pasky@ucw.cz>
Feature of the Day implementation
LEDs, exmode, marks and other worthless toys
Actually even some documentation!
http://elinks.or.cz/ (original cut)
http://elinks.cz/ (original cut)
Petr Cech <cech@atrey.karlin.mff.cuni.cz>
Allow spaces at the beginning of URL

2
BUGS
View File

@ -1,4 +1,4 @@
All the known bugs are now kept in the Bugzilla, available at
http://bugzilla.elinks.or.cz/
http://bugzilla.elinks.cz/

View File

@ -13,7 +13,13 @@ PATHSCRIPT = case '@top_srcdir@' in /*) ;; *) echo $(top_builddir)/;; esac
PATHPREFIX = $(shell $(PATHSCRIPT))
top_srcdir = $(PATHPREFIX)@top_srcdir@
SRCPATH = $(shell cd $(top_srcdir)/$(RELPATH) && pwd)
ifeq ($(SRCPATH),$(CURPATH))
srcdir =
else
srcdir = $(top_srcdir)/$(RELPATH)
endif
prefix = @prefix@
exec_prefix = @exec_prefix@
@ -76,7 +82,6 @@ PYTHON_LIBS = @PYTHON_LIBS@
RANLIB = @RANLIB@
RUBY_CFLAGS = @RUBY_CFLAGS@
RUBY_LIBS = @RUBY_LIBS@
SEE_CFLAGS = @SEE_CFLAGS@
SPARSE = @SPARSE@
SPIDERMONKEY_CFLAGS = @SPIDERMONKEY_CFLAGS@
SPIDERMONKEY_LIBS = @SPIDERMONKEY_LIBS@
@ -134,10 +139,10 @@ CONFIG_RISCOS = @CONFIG_RISCOS@
CONFIG_RUBY = @CONFIG_RUBY@
CONFIG_SCANNER = @CONFIG_SCANNER@
CONFIG_SCRIPTING = @CONFIG_SCRIPTING@
CONFIG_SEE = @CONFIG_SEE@
CONFIG_SHA1 = @CONFIG_SHA1@
CONFIG_SMALL = @CONFIG_SMALL@
CONFIG_SMB = @CONFIG_SMB@
CONFIG_SM_SCRIPTING = @CONFIG_SM_SCRIPTING@
CONFIG_SPIDERMONKEY = @CONFIG_SPIDERMONKEY@
CONFIG_SSL = @CONFIG_SSL@
CONFIG_SYSMOUSE = @CONFIG_SYSMOUSE@
@ -158,6 +163,8 @@ INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
MAKE_COLOR = @MAKE_COLOR@
### This is here because Makefile.config is usually the first thing
### we get and sometimes the all rule can be implicit, yet we want

View File

@ -14,36 +14,48 @@ else
mquiet = quiet_
endif
# Colorize the build.
ifdef MAKE_COLOR
INFO_COLOR = $(shell tput setaf 5)
CC_COLOR = $(shell tput setaf 6)
LD_COLOR = $(shell tput setaf 2)
PO_COLOR = $(shell tput setaf 6)
LINK_COLOR = $(shell tput bold;tput setaf 4)
INSTALL_COLOR = $(shell tput setaf 3)
END_COLOR = $(shell tput sgr0)
endif
# Show the command (quiet or non-quiet version based on the assignment
# just above) and then execute it.
ncmd = $(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
cmd = @$(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
mcmd = @$(if $($(mquiet)cmd_$(1)),echo $($(mquiet)cmd_$(1)) &&) $(cmd_$(1))
ecmd = @$(if $($(mquiet)cmd_$(1)),printf "%-38s " $($(mquiet)cmd_$(1)) &&) $(cmd_$(1))
quiet_cmd_compile = ' [CC] $(RELPATH)$@'
quiet_cmd_compile = ' [$(CC_COLOR)CC$(END_COLOR)] $(RELPATH)$@'
masq_cmd_compile = $(COMPILE) -c $<
cmd_compile = $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
# Rule to compile a set of .o files into one .o file
quiet_cmd_ld_objs = " [LD] $(RELPATH)$@"
quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@"
cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \
$(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \
`test -e $(subdir)/lib.o && echo $(subdir)/lib.o`)
quiet_cmd_link = ' [LINK] $(RELPATH)$@'
quiet_cmd_link = ' [$(LINK_COLOR)LINK$(END_COLOR)] $(RELPATH)$@'
cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
quiet_cmd_sparse = ' [SPARSE] $(RELPATH)$(2)'
cmd_sparse = $(SPARSE) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) $(SPARSE_FLAGS) $(2)
# Recursive make
quiet_cmd_recmake = "[MAKE $(3)] $(RELPATH)$(2)"
quiet_cmd_recmake = "[$(INFO_COLOR)MAKE $(3)$(END_COLOR)] $(RELPATH)$(2)"
cmd_recmake = $(MAKE) -C $(2) $(3)
quiet_cmd_installdata = " [INSTALL] $(RELPATH)$(2) -> $(3)"
quiet_cmd_installdata = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)$(2) -> $(3)"
cmd_installdata = $(INSTALL_DATA) $(2) $(3)
quiet_cmd_installprog = " [INSTALL] $(RELPATH)$(2) -> $(3)"
quiet_cmd_installprog = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)$(2) -> $(3)"
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
@ -88,9 +100,15 @@ ifdef INCLUDE_ALL
ifdef SUBDIRS-no
SUBDIRS += $(SUBDIRS-no)
endif
ifdef SUBDIRS-
SUBDIRS += $(SUBDIRS-)
endif
ifdef OBJS-no
OBJS += $(OBJS-no)
endif
ifdef OBJS-
OBJS += $(OBJS-)
endif
endif
@ -113,7 +131,7 @@ init-default:
echo 'include $(SRC)/$(RELPATH)/$(subdir)/Makefile' > $(subdir)/Makefile;)
clean-default:
-test -z "$(CLEAN)" || $(RM) $(CLEAN)
@-test -z "$(CLEAN)" || $(RM) $(CLEAN)
cleanall-default: clean-default

1
NEWS
View File

@ -11,6 +11,7 @@ ELinks now:
* SSL support via GNUTLS now requires 1.2 or higher
* support for Lua 4.x was dropped, we only support Lua 5.x now
* Python scripting back-end (experimental)
* Spidermonkey based ECMAScript scripting back-end (experimental)
* 88 colors support
* default URI-rewrite rule, used when no other rules match but the string that
was entered in the Go to URL box does not resemble a URI

8
README
View File

@ -8,7 +8,7 @@ on a variety of platforms.
The ELinks official website is available at
http://elinks.or.cz/
http://elinks.cz/
Please see the SITES file for mirrors or other recommended sites. If you
want to install ELinks on your computer, see the INSTALL file for further
@ -18,8 +18,8 @@ A good start point is documentation files available in doc/, especially the
file named index.txt.
If you want to request features or report bugs, see community information at
http://elinks.or.cz/community.html and feedback information available at
http://elinks.or.cz/feedback.html.
http://elinks.cz/community.html and feedback information available at
http://elinks.cz/feedback.html.
If you want to write some patches, please first read the doc/hacking.txt
document.
@ -55,7 +55,7 @@ separation of add-on modules (like cookies, bookmarks, ssl, scripting etc).
For more details about ELinks history, please see
http://elinks.or.cz/history.html
http://elinks.cz/history.html
If you are more interested in the history and various Links clones and versions,
you can examine the website at

3
SITES
View File

@ -10,9 +10,6 @@ RPMs:
http://ftp.nest.pld-linux.org/pool/e/elinks/
http://ftp.pld-linux.org/pool/e/elinks/
Cygwin binaries:
http://www.pervalidus.net/cygwin/links/
RISC OS binaries:
http://www.riscos.info/unix/indexes/browser.html

2
THANKS
View File

@ -12,6 +12,6 @@ Thanks to Gerard Beekmans <gerard@linuxfromscratch.org> for providing us the
resources for our mailing lists at linuxfromscratch.org servers.
Thanks to Jan Sembera <jan.sembera@flexible.cz> for providing us the space and
bandwidth on his server for elinks.or.cz and cvs.elinks.or.cz.
bandwidth on his server for elinks.cz and cvs.elinks.cz.
Thanks to Zdenek Burda for donating the elinks.cz domain.

2
TODO
View File

@ -1,4 +1,4 @@
The ELinks TODO items are kept in Bugzilla (http://bugzilla.elinks.or.cz/),
The ELinks TODO items are kept in Bugzilla (http://bugzilla.elinks.cz/),
look for the bugs with 'enhancement' severity. Some generic goals are still
kept here, though, to be more on the developers' eyes ;-).

4
Unicode/.gitignore vendored
View File

@ -1,4 +0,0 @@
Makefile
Makefile.in
.deps
*.swp

View File

@ -1,48 +0,0 @@
AC_DEFUN([EL_CONFIG_SEE],
[
enable_see="no";
AC_ARG_WITH(see, [ --with-see enable Simple Ecmascript Engine (SEE) support],
[ if test "x$withval" != xno; then enable_see=yes; fi ])
# The following is probably bad, ugly and so on. Stolen from Guile's (1.4)
# SEE_FLAGS but I really don't want to require people to have Guile in order
# to compile CVS. Also, the macro seems to be really stupid regarding searching
# for Guile in $PATH etc. --pasky
AC_MSG_CHECKING([for SEE])
if test "$enable_see" = "yes"; then
AC_MSG_RESULT(yes);
## Based on the SEE_FLAGS macro.
if test -d "$withval"; then
SEE_PATH="$withval:$PATH"
else
SEE_PATH="$PATH"
fi
AC_PATH_PROG(SEE_CONFIG, libsee-config, no, $SEE_PATH)
## First, let's just see if we can find Guile at all.
if test "$SEE_CONFIG" != no; then
cf_result="yes";
SEE_LIBS="`$SEE_CONFIG --libs`"
SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
LIBS="$SEE_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $SEE_CFLAGS"
EL_CONFIG(CONFIG_SEE, [SEE])
AC_SUBST(SEE_CFLAGS)
else
if test -n "$withval" && test "x$withval" != xno; then
AC_MSG_ERROR([SEE not found])
else
AC_MSG_WARN([SEE support disabled])
fi
fi
else
AC_MSG_RESULT(no);
fi
])

View File

@ -21,7 +21,7 @@ do
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
#echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?

View File

@ -5,7 +5,7 @@ AC_INIT(src/main/main.c)
AC_CONFIG_AUX_DIR(config)
PACKAGE=elinks
VERSION=0.11rc0.GIT
VERSION=0.12.GIT
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Package version])
@ -496,6 +496,63 @@ if test "$CONFIG_WIN32" = yes; then
EL_CONFIG_WIN32
fi
dnl ===================================================================
dnl Check for SpiderMonkey, optional even if installed.
dnl ===================================================================
AC_ARG_WITH(spidermonkey, [ --without-spidermonkey disable SpiderMonkey Mozilla JavaScript engine support],
[if test "$withval" = no; then disable_spidermonkey=yes; fi])
AC_MSG_CHECKING([for SpiderMonkey])
EL_SAVE_FLAGS
cf_result=no
if test -z "$disable_spidermonkey"; then
if test ! -d "$withval"; then
withval="";
fi
for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do
for spidermonkeyinclude in "/include" "/include/js" "/include/smjs"; do
for spidermonkeylib in js smjs; do
if test "$cf_result" = no; then
SPIDERMONKEY_LIBS="-l$spidermonkeylib"
if test ! -z "$spidermonkeydir"; then
SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib $SPIDERMONKEY_LIBS"
SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude"
fi
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
AC_TRY_LINK([#define XP_UNIX
#include <jsapi.h>],
[JS_GetImplementationVersion()],
cf_result=yes, cf_result=no)
fi
done
done
done
fi
AC_MSG_RESULT($cf_result)
if test "$cf_result" != yes; then
EL_RESTORE_FLAGS
else
EL_CONFIG(CONFIG_SPIDERMONKEY, [SpiderMonkey])
CFLAGS="$CFLAGS_X"
AC_SUBST(SPIDERMONKEY_LIBS)
AC_SUBST(SPIDERMONKEY_CFLAGS)
fi
AC_SUBST(CONFIG_SPIDERMONKEY)
EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_SPIDERMONKEY], [ECMAScript (JavaScript)])
dnl ===================================================================
dnl Check for Guile, optional even if installed.
dnl ===================================================================
@ -725,82 +782,35 @@ dnl ===================================================================
EL_CONFIG_RUBY
dnl ===================================================================
dnl Check for SEE, optional even if installed.
dnl Optional Spidermonkey-based ECMAScript browser scripting
dnl ===================================================================
EL_CONFIG_SEE
AC_ARG_ENABLE(sm-scripting,
[ --disable-sm-scripting ECMAScript browser scripting (requires Spidermonkey)],
[if test "$enableval" != no; then enableval="yes"; fi
CONFIG_SM_SCRIPTING="$enableval";])
if test "x$CONFIG_SPIDERMONKEY" = xyes &&
test "x$CONFIG_SM_SCRIPTING" = xyes; then
EL_CONFIG(CONFIG_SM_SCRIPTING, [SpiderMonkey])
else
CONFIG_SM_SCRIPTING=no
fi
dnl ===================================================================
dnl Setup global scripting
dnl ===================================================================
EL_CONFIG_DEPENDS(CONFIG_SCRIPTING, [CONFIG_GUILE CONFIG_LUA CONFIG_PERL CONFIG_PYTHON CONFIG_RUBY CONFIG_SEE], [Scripting])
EL_CONFIG_DEPENDS(CONFIG_SCRIPTING, [CONFIG_GUILE CONFIG_LUA CONFIG_PERL CONFIG_PYTHON CONFIG_RUBY CONFIG_SM_SCRIPTING], [Browser scripting])
AC_SUBST(CONFIG_GUILE)
AC_SUBST(CONFIG_LUA)
AC_SUBST(CONFIG_PERL)
AC_SUBST(CONFIG_PYTHON)
AC_SUBST(CONFIG_RUBY)
AC_SUBST(CONFIG_SEE)
AC_SUBST(CONFIG_SM_SCRIPTING)
AC_SUBST(CONFIG_SCRIPTING)
dnl ===================================================================
dnl Check for SpiderMonkey, optional even if installed.
dnl ===================================================================
AC_ARG_WITH(spidermonkey, [ --without-spidermonkey disable SpiderMonkey Mozilla JavaScript engine support],
[if test "$withval" = no; then disable_spidermonkey=yes; fi])
AC_MSG_CHECKING([for SpiderMonkey])
EL_SAVE_FLAGS
cf_result=no
if test -z "$disable_spidermonkey"; then
if test ! -d "$withval"; then
withval="";
fi
for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do
for spidermonkeyinclude in "/include" "/include/js" "/include/smjs"; do
for spidermonkeylib in js smjs; do
if test "$cf_result" = no; then
SPIDERMONKEY_LIBS="-l$spidermonkeylib"
if test ! -z "$spidermonkeydir"; then
SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib $SPIDERMONKEY_LIBS"
SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude"
fi
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
AC_TRY_LINK([#define XP_UNIX
#include <jsapi.h>],
[JS_GetImplementationVersion()],
cf_result=yes, cf_result=no)
fi
done
done
done
fi
AC_MSG_RESULT($cf_result)
if test "$cf_result" != yes; then
EL_RESTORE_FLAGS
else
EL_CONFIG(CONFIG_SPIDERMONKEY, [SpiderMonkey])
CFLAGS="$CFLAGS_X"
AC_SUBST(SPIDERMONKEY_LIBS)
AC_SUBST(SPIDERMONKEY_CFLAGS)
fi
AC_SUBST(CONFIG_SPIDERMONKEY)
EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_SPIDERMONKEY], [ECMAScript (JavaScript)])
dnl ===================================================================
dnl Check for SSL support.
dnl ===================================================================
@ -1227,7 +1237,7 @@ if test "x$ac_cv_prog_gcc" = "xyes"; then
CFLAGS="$CFLAGS -Werror"
fi
case "`gcc -dumpversion`" in
case "`$CC -dumpversion`" in
3.0|3.1|3.2)
# These should be ok using -Werror
;;
@ -1257,6 +1267,15 @@ ALL_CFLAGS="$CFLAGS $CPPFLAGS"
EL_LOG_CONFIG(ALL_CFLAGS, [Compiler options (CFLAGS)], [])
EL_LOG_CONFIG(LIBS, [Linker options (LIBS)], [])
dnl ===================================================================
dnl Colored make output
dnl ===================================================================
if test $(`which tput` colors) -ge 4; then
MAKE_COLOR=1
AC_SUBST(MAKE_COLOR)
fi
dnl ===================================================================
dnl Generated files
dnl ===================================================================

View File

@ -37,8 +37,8 @@ License: GPL
Vendor: ELinks project <elinks-users@linuxfromscratch.org>
Packager: Petr Baudis <pasky@ucw.cz>
Group: Applications/Internet
Source: http://elinks.or.cz/download/%{name}-%{version}.tar.bz2
URL: http://elinks.or.cz/
Source: http://elinks.cz/download/%{name}-%{version}.tar.bz2
URL: http://elinks.cz/
BuildRequires: bzip2-devel
BuildRequires: expat-devel
BuildRequires: gpm-devel
@ -133,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT
# date +"%a %b %d %Y"
%changelog
* Thu Dec 29 2005 Miciah Dashiel Butler Masters <mdm0304@ecu.edu>
- elinks.or.cz -> elinks.cz
*Tue Jun 14 2005 Witold Filipczyk <witekfl@pld-linux.org>
- removed unused texi2html dependency
- removed unused libdir directory

View File

@ -9,15 +9,22 @@ if [ -z "`which wget 2>/dev/null`" ]; then
exit 1
fi
[ -d .git ] && cd .git
[ "$GIT_DIR" ] || GIT_DIR=.git
if ! [ -d "$GIT_DIR" ]; then
echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
exit 1
fi
cd "$GIT_DIR"
echo "[grafthistory] Downloading the history"
mkdir -p objects/pack
cd objects/pack
wget -c http://elinks.or.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx
wget -c http://elinks.or.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack
wget -c http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx
wget -c http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack
echo "[grafthistory] Setting up the grafts"
cd ../..
mkdir -p info
# master
echo 0f6d4310ad37550be3323fab80456e4953698bf0 06135dc2b8bb7ed2e441305bdaa82048396de633 >>info/grafts
# REL_0_10

View File

@ -171,8 +171,8 @@ end
dumbprefixes = {
arc = "http://web.archive.org/web/*/%c",
b = "http://babelfish.altavista.com/babelfish/tr",
bz = "http://bugzilla.elinks.or.cz",
bug = "http://bugzilla.elinks.or.cz",
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/",
@ -225,7 +225,7 @@ function cvsweb (base, project, url)
string.gsub(url, "([^%s]+)", function (w) table.insert(t, w) end)
file, old, new = t[1], t[2], t[3]
if t[4] then error('this smartprefix takes only two to three arguments') return nil end
if t[4] then error('this smartprefix takes only one to three arguments') return nil end
if not file then error('no file given') return nil end
if new then return base..project.."/"..file..".diff?r1="..old.."&r2="..new.."&f=u"
@ -263,12 +263,12 @@ end
smartprefixes = {
arc = "http://web.archive.org/web/*/%s",
bug = function (url) return bugzilla('http://bugzilla.elinks.or.cz/', url) end,
bug = function (url) return bugzilla('http://bugzilla.elinks.cz/', url) end,
cambridge = "http://dictionary.cambridge.org/results.asp?searchword=%s",
cliki = "http://www.cliki.net/admin/search?words=%s",
-- If you want to add a smartprefix for another project's CVSweb,
-- just create a lambda like this. Aren't high-level languages fun?
cvs = function (x) return cvsweb ("http://cvsweb.elinks.or.cz/cvsweb.cgi/", "elinks", x) end,
cvs = function (x) return cvsweb ("http://cvsweb.elinks.cz/cvsweb.cgi/", "elinks", x) end,
d = "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query",
debcontents = debian_contents,
debfile = debian_file,

View File

@ -135,41 +135,42 @@ B<bugmenot> or B<bn>
{
($current_url) = $current_url =~ /^.*:\/\/(.*)/;
my $bugmenot = 'http://bugmenot.com/view.php?url=' . $current_url;
my $tempfile = $ENV{'HOME'} . '/.elinks/elinks';
my $matrix = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
for (0..int(rand(7) + 9))
{
$tempfile = $tempfile . substr($matrix, (length($matrix) - 1) - rand(length($matrix) + 1), 1);
}
my ($message, $login, $password);
system('elinks -no-home -source "' . $bugmenot . '" >' . $tempfile . ' 2>/dev/null');
open FILE, "<$tempfile" or return $bugmenot;
$message = <FILE>;
while (<FILE>)
{
next unless (m/^<dd>(.*)<br \/>(.*)<\/dd><\/dl>$/);
$login = $1;
$password = $2;
}
$login =~ s/(^\s*|\n|\s*$)//g if $login;
$password =~ s/(^\s*|\n|\s*$)//g if $password;
close FILE;
unlink $tempfile;
return $bugmenot unless $message =~ /[a-z]+/ and $message !~ /404/;
unless ($message =~ s/.*(No accounts found\.).*/${1}/)
{
if ($login and $password)
{
$message = "Login: " . $login . "\nPassword: " . $password;
}
else
{
$message = 'No accounts found';
}
}
system('elinks -remote "infoBox\(' . $message . ')" >/dev/null 2>&1 &');
return $current_url; #FIXME
# return;
#my $tempfile = $ENV{'HOME'} . '/.elinks/elinks';
#my $matrix = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
#for (0..int(rand(7) + 9))
#{
#$tempfile = $tempfile . substr($matrix, (length($matrix) - 1) - rand(length($matrix) + 1), 1);
#}
#my ($message, $login, $password);
#system('elinks -no-home -source "' . $bugmenot . '" >' . $tempfile . ' 2>/dev/null');
#open FILE, "<$tempfile" or return $bugmenot;
#$message = <FILE>;
#while (<FILE>)
#{
#next unless (m/^<dd>(.*)<br \/>(.*)<\/dd><\/dl>$/);
#$login = $1;
#$password = $2;
#}
#$login =~ s/(^\s*|\n|\s*$)//g if $login;
#$password =~ s/(^\s*|\n|\s*$)//g if $password;
#close FILE;
#unlink $tempfile;
#return $bugmenot unless $message =~ /[a-z]+/ and $message !~ /404/;
#unless ($message =~ s/.*(No accounts found\.).*/${1}/)
#{
#if ($login and $password)
#{
#$message = "Login: " . $login . "\nPassword: " . $password;
#}
#else
#{
#$message = 'No accounts found';
#}
#}
#system('elinks -remote "infoBox\(' . $message . ')" >/dev/null 2>&1 &');
#return $current_url; #FIXME
##return;
return $bugmenot . $current_url;
}
@ -896,7 +897,7 @@ There's no place like home...
my ($bug) = $url =~ /^.* (.*)/;
if ($url =~ '^b')
{
my $bugzilla = 'http://bugzilla.elinks.or.cz';
my $bugzilla = 'http://bugzilla.elinks.cz';
if (not $bug)
{
if (loadrc("email"))
@ -922,7 +923,7 @@ There's no place like home...
$doc = '/documentation' if $url =~ '^doc';
$doc = '/faq.html' if $url =~ '^(faq|help)$';
$doc = '/documentation/html/manual.html' if $url =~ '^manual$';
return 'http://elinks.or.cz' . $doc;
return 'http://elinks.cz' . $doc;
}
}

View File

@ -1,220 +0,0 @@
/* Hooks for the ELinks SEE browser scripting
*
* Copyright (c) Jonas Fonseca, 2005
*/
function quit()
{
// alert("quiting ... " + navigator.appVersion);
}
/*********************************************************************
* goto_url(url, current_url)
*********************************************************************/
var goto_url_hooks = []
function goto_url(url, current_url)
{
var context = {
url: url,
current_url: current_url ? current_url : ""
}
for (var i = 0; i < goto_url_hooks.length; i++)
if (goto_url_hooks[i](context, current_url))
break
return context.url
}
// Don't take localhost as directory name
function expand_localhost(context)
{
if (context.url.match(/localhost/)) {
context.url = "http://" + context.url + "/"
return true
}
return false
}
goto_url_hooks.push(expand_localhost)
// You can write smt like "gg" to goto URL dialog and it'll go to google.com.
// Note that this is obsoleted by the URI rewrite plugin.
var dumbprefixes = {
arc: "http://web.archive.org/web/*/%c",
b: "http://babelfish.altavista.com/babelfish/tr",
bz: "http://bugzilla.elinks.or.cz",
bug: "http://bugzilla.elinks.or.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/",
vhtml: "http://validator.w3.org/check?uri=%c",
vcss: "http://jigsaw.w3.org/css-validator/validator?uri=%c"
}
function expand_dumbprefix(context, current_url)
{
if (dumbprefixes[context.url]) {
context.url = dumbprefixes[context.url].replace(/%c/, current_url)
return true
}
return false
}
goto_url_hooks.push(expand_dumbprefix)
function gmane(url)
{
var match = url.match(/([^\s]+)\s+(.*)$/)
var group = match[1]
var words = match[2]
if (!words) return null
return "http://search.gmane.org/search.php?query=" + words + "&group=" + group
}
function gitweb(base_url)
{
return function (arguments) {
var url = base_url
var match = arguments.match(/^(search|summary|shortlog|log|commit|commitdiff|tree)(\s(.*))?/)
if (match[1])
url += ';a=' + match[1]
else
url += ';a=summary'
if (match[1] == 'search' && match[3])
url += ';s=' + escape(match[3])
return url
}
}
function bugzilla (base_url)
{
return function (arguments) {
if (!arguments || arguments == '')
return base_url
if (arguments.match(/^[\d]+$/))
return base_url + 'show_bug.cgi?id=' + arguments
return base_url + 'buglist.cgi?short_desc_type=allwordssubstr'
+ '&short_desc=' + escape(arguments)
}
}
var smartprefixes = {
arc: "http://web.archive.org/web/*/%s",
bug: bugzilla('http://bugzilla.elinks.or.cz/'),
cambridge: "http://dictionary.cambridge.org/results.asp?searchword=%s",
cliki: "http://www.cliki.net/admin/search?words: %s",
d: "http://www.dict.org/bin/Dict?Query: %s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query",
dmoz: "http://search.dmoz.org/cgi-bin/search?search=%s",
foldoc: "http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?%s",
g: "http://www.google.com/search?q=%s&btnG=Google+Search",
gd: "http://www.google.com/search?q=%s&cat=gwd/Top",
gg: "http://www.google.com/search?q=%s&btnG=Google+Search",
// Whose idea was it to use 'gg' for websearches? -- Miciah
//gg = "http://groups.google.com/groups?q=%s",
gi: "http://images.google.com/images?q=%s",
gitweb: gitweb("http://pasky.or.cz/gitweb.cgi?p=elinks.git"),
gmane: gmane,
gn: "http://news.google.com/news?q=%s",
go: "http://www.google.com/search?q=%s&btnG=Google+Search",
gwho: "http://www.googlism.com/?ism=%s&name=1",
gwhat: "http://www.googlism.com/?ism=%s&name=2",
gwhere: "http://www.googlism.com/?ism=%s&name=3",
gwhen: "http://www.googlism.com/?ism=%s&name=4",
fm: "http://www.freshmeat.net/search/?q=%s",
savannah: "http://savannah.nongnu.org/search/?words=%s&type_of_search=soft&exact=1",
sf: "http://sourceforge.net/search/?q=%s",
sfp: "http://sourceforge.net/projects/%s",
sd: "http://www.slashdot.org/search.pl?query=%s",
sdc: "http://www.slashdot.org/search.pl?query=%s&op=comments",
sdu: "http://www.slashdot.org/search.pl?query=%s&op=users",
sdp: "http://www.slashdot.org/search.pl?query=%s&op=polls",
sdj: "http://www.slashdot.org/search.pl?query=%s&op=journals",
dbug: "http://bugs.debian.org/%s",
dpkg: "http://packages.debian.org/%s",
emacs: "http://www.emacswiki.org/cgi-bin/wiki.pl?search=%s",
lyrics: "http://music.lycos.com/lyrics/results.asp?QT=L&QW=%s",
lxr: "http://lxr.linux.no/ident?i=%s",
leo: "http://dict.leo.org/?search=%s",
onelook: "http://onelook.com/?w=%s&ls=a",
py: "http://starship.python.net/crew/theller/pyhelp.cgi?keyword=%s&version=current",
pydev: "http://starship.python.net/crew/theller/pyhelp.cgi?keyword=%s&version=devel",
pyvault: "http://py.vaults.ca/apyllo.py?find=%s",
e2: "http://www.everything2.org/?node=%s",
encz: "http://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=0&ecd_lines=15&ecd_hptxt=0",
czen: "http://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=1&ecd_lines=15&ecd_hptxt=0",
dict: "http://dictionary.reference.com/search?q=%s",
thes: "http://thesaurus.reference.com/search?q=%s",
a: "http://acronymfinder.com/af-query.asp?String=exact&Acronym=%s",
imdb: "http://imdb.com/Find?%s",
mw: "http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=%s",
mwt: "http://www.m-w.com/cgi-bin/thesaurus?book=Thesaurus&va=%s",
whatis: "http://uptime.netcraft.com/up/graph/?host=%s",
wiki: "http://www.wikipedia.org/w/wiki.phtml?search=%s",
wn: "http://www.cogsci.princeton.edu/cgi-bin/webwn1.7.1?stage=1&word=%s",
// rfc by number
rfc: "http://www.rfc-editor.org/rfc/rfc%s.txt",
// rfc search
rfcs: "http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
cr: "http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
// Internet Draft search
rfcid: "http://www.rfc-editor.org/cgi-bin/idsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
urbandict: "http://www.urbandictionary.com/define.php?term=%s",
id: "http://www.rfc-editor.org/cgi-bin/idsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
draft: "http://www.rfc-editor.org/cgi-bin/idsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25"
}
function expand_smartprefix(context, current_url)
{
var match = context.url.match(/^([^:\s]+)(:|\s)\s*(.*)\s*$/)
if (match && match[1] && match[3]) {
var nick = match[1]
var val = match[3]
if (smartprefixes[nick]) {
if (typeof smartprefixes[nick] == 'string') {
context.url = smartprefixes[nick].replace(/%s/, escape(val))
return true
} else if (typeof smartprefixes[nick] == 'function') {
context.url = smartprefixes[nick](val)
return true
} else {
alert('smartprefix "' + nick + '" has unsupported type "' + typeof smartprefixes[nick] + '".')
return false
}
}
}
// Unmatched.
return false
}
goto_url_hooks.push(expand_smartprefix)

75
contrib/smjs/hooks.js Normal file
View File

@ -0,0 +1,75 @@
/* These are examples for the ELinks SpiderMonkey scripting interface.
* Place choice parts in a file named "hooks.js" in your ELinks configuration
* directory (~/.elinks).
*/
elinks.keymaps.main["@"] = function () {
elinks.location = elinks.location + "/..";
};
elinks.preformat_html_hooks = new Array();
elinks.preformat_html = function (cached) {
for (var i in elinks.preformat_html_hooks)
if (!elinks.preformat_html_hooks[i](cached))
return false;
return true;
};
elinks.goto_url_hooks = new Array();
elinks.goto_url_hook = function (url) {
for (var i in elinks.goto_url_hooks){
url = elinks.goto_url_hooks[i](url);
if (false === url) return false;
}
return url;
};
elinks.follow_url_hooks = new Array();
elinks.follow_url_hook = function (url) {
for (var i in elinks.follow_url_hooks) {
url = elinks.follow_url_hooks[i](url);
if (false === url) return false;
}
return url;
};
function root_w00t(cached) {
cached.content = cached.content.replace(/root/g, "w00t");
return true;
};
elinks.preformat_html_hooks.push(root_w00t);
function mangle_deb_bugnumbers(cached) {
if (!cached.uri.match(/^[a-z0-9]+:\/\/[a-z0-9A-Z.-]+debian\.org/)
&& !cached.uri.match(/changelog\.Debian/))
return true;
var num_re = /([0-9]+)/g;
var rewrite_closes_fn = function (str) {
return str.replace(num_re,
'<a href="http://bugs.debian.org/$1">$1</a>');
}
/* Debian Policy Manual 4.4 footnote 16 */
var closes_re = /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/gi;
cached.content = cached.content.replace(closes_re, rewrite_closes_fn);
return true;
}
elinks.preformat_html_hooks.push(mangle_deb_bugnumbers);
function block_pr0n(uri) {
if (uri.match(/pr0n/)) {
elinks.alert('No pr0n!');
return "";
}
return true;
}
elinks.follow_url_hooks.push(block_pr0n);
do_file(elinks.home + 'smartprefixes_bookmarks.js');
do_file(elinks.home + 'smartprefixes_classic.js');

View File

@ -0,0 +1,35 @@
/* Modern, bookmark-based smartprefixes */
var loaded_smartprefixes_common_code;
if (!loaded_smartprefixes_common_code) {
do_file(elinks.home + "smartprefixes_common.js");
loaded_smartprefixes_common_code = 1;
}
/* Create a top-level folder titled "smartprefixes". In it, add a bookmark
* for each smartprefix, putting the keyword in the title and either a normal
* URI or some JavaScript code prefixed with "javascript:" as the URI. When you
* enter the keyword in the Go to URL box, ELinks will take the URI
* of the corresponding bookmark, replace any occurrence of "%s" with the rest
* of the text entered in the Go to URL box, evaluate the code if the URI
* starts with "javascript:", and go to the resulting URI.
*/
function rewrite_uri(uri) {
if (!elinks.bookmarks.smartprefixes) return uri;
var parts = uri.split(" ");
var prefix = parts[0];
if (!elinks.bookmarks.smartprefixes.children[prefix]) return uri;
var rule = elinks.bookmarks.smartprefixes.children[prefix].url;
var rest = parts.slice(1).join(" ");
if (rule.match(/^javascript:/))
return eval(rule
.replace(/^javascript:/, "")
.replace(/%s/, rest));
return rule.replace(/%s/, escape(rest));
}
elinks.goto_url_hooks.push(rewrite_uri);

View File

@ -0,0 +1,102 @@
/* Classic, table-based smartprefixes. */
var loaded_smartprefixes_common_code;
if (!loaded_smartprefixes_common_code) {
do_file(elinks.home + "smartprefixes_common.js");
loaded_smartprefixes_common_code = 1;
}
var smartprefixes = {
arc: "http://web.archive.org/web/*/%s",
binsearch: "http://binsearch.info/?q=%s",
bug: function (url) { return bugzilla('http://bugzilla.elinks.cz/', url) },
cambridge: "http://dictionary.cambridge.org/results.asp?searchword=%s",
cliki: "http://www.cliki.net/admin/search?words=%s",
// If you want to add a smartprefix for another project's CVSweb,
// just create a lambda like this. Aren't high-level languages fun?
cvs: function (x) { return cvsweb ("http://cvsweb.elinks.cz/cvsweb.cgi/", "elinks", x) },
gitweb: function (x) { return gitweb("http://pasky.or.cz/gitweb.cgi", "elinks.git", x) },
d: "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query",
debcontents: debian_contents,
debfile: debian_file,
dix: "http://dix.osola.com/?search=%s",
dmoz: "http://search.dmoz.org/cgi-bin/search?search=%s",
foldoc: "http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?%s",
g: "http://www.google.com/search?q=%s&btnG=Google+Search",
gd: "http://www.google.com/search?q=%s&cat=gwd/Top",
// Whose idea was it to use 'gg' for websearches? -- Miciah
//gg: "http://groups.google.com/groups?q=%s",
gi: "http://images.google.com/images?q=%s",
gmane: gmane,
gn: "http://news.google.com/news?q=%s",
go: "http://www.google.com/search?q=%s&btnG=Google+Search",
gwho: "http://www.googlism.com/?ism=%s&name=1",
gwhat: "http://www.googlism.com/?ism=%s&name=2",
gwhere: "http://www.googlism.com/?ism=%s&name=3",
gwhen: "http://www.googlism.com/?ism=%s&name=4",
fm: "http://www.freshmeat.net/search/?q=%s",
savannah: "http://savannah.nongnu.org/search/?words=%s&type_of_search=soft&exact=1",
sf: "http://sourceforge.net/search/?q=%s",
sfp: "http://sourceforge.net/projects/%s",
sd: "http://www.slashdot.org/search.pl?query=%s",
sdc: "http://www.slashdot.org/search.pl?query=%s&op=comments",
sdu: "http://www.slashdot.org/search.pl?query=%s&op=users",
sdp: "http://www.slashdot.org/search.pl?query=%s&op=polls",
sdj: "http://www.slashdot.org/search.pl?query=%s&op=journals",
dbug: "http://bugs.debian.org/%s",
dix: "http://dix.osola.com/index.de.php?trans=1&search=%s",
dixgram: "http://dix.osola.com/v.php?language=german&search=%s",
dpkg: "http://packages.debian.org/%s",
emacs: "http://www.emacswiki.org/cgi-bin/wiki.pl?search=%s",
lyrics: "http://music.lycos.com/lyrics/results.asp?QT=L&QW=%s",
lxr: "http://lxr.linux.no/ident?i=%s",
leo: "http://dict.leo.org/?search=%s",
nclaw: "http://www.ncleg.net/gascripts/Statutes/StatutesSearch.asp?searchScope=All&searchCriteria=%s&returnType=Section",
onelook: "http://onelook.com/?w=%s&ls=a",
py: "http://starship.python.net/crew/theller/pyhelp.cgi?keyword=%s&version=current",
pydev: "http://starship.python.net/crew/theller/pyhelp.cgi?keyword=%s&version=devel",
pyvault: "http://py.vaults.ca/apyllo.py?find=%s",
e2: "http://www.everything2.org/?node=%s",
encz: "http://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=0&ecd_lines=15&ecd_hptxt=0",
czen: "http://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=1&ecd_lines=15&ecd_hptxt=0",
dict: "http://dictionary.reference.com/search?q=%s",
thes: "http://thesaurus.reference.com/search?q=%s",
a: "http://acronymfinder.com/af-query.asp?String=exact&Acronym=%s",
imdb: "http://imdb.com/Find?%s",
mw: "http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=%s",
mwt: "http://www.m-w.com/cgi-bin/thesaurus?book=Thesaurus&va=%s",
whatis: "http://uptime.netcraft.com/up/graph/?host=%s",
wiki: "http://en.wikipedia.org/w/wiki.phtml?search=%s",
wikide: "http://de.wikipedia.org/w/wiki.phtml?search=%s",
wn: "http://www.cogsci.princeton.edu/cgi-bin/webwn1.7.1?stage=1&word=%s",
// rfc by number
rfc: "http://www.rfc-editor.org/rfc/rfc%s.txt",
// rfc search
rfcs: "http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
cr: "http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
// Internet Draft search
rfcid: "http://www.rfc-editor.org/cgi-bin/idsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
urbandict: "http://www.urbandictionary.com/define.php?term=%s",
id: "http://www.rfc-editor.org/cgi-bin/idsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
draft: "http://www.rfc-editor.org/cgi-bin/idsearch.pl?searchwords=%s&format=http&abstract=abson&keywords=keyon&num=25",
};
function rewrite_uri_classic(uri) {
var parts = uri.split(" ");
var prefix = parts[0];
var rest = parts.slice(1).join(" ");
var rule = smartprefixes[prefix];
if (rule) {
if (typeof(rule) == 'string')
return rule.replace(/%s/, escape(rest));
if (typeof(rule) == 'function')
return rule(rest);
elinks.alert('smartprefix[' + prefix + ']'
+ ' has unsupported type "' + t + '".');
}
return uri;
}
elinks.goto_url_hooks.push(rewrite_uri_classic);

View File

@ -0,0 +1,102 @@
/* Common code for smartprefixes_classic.js and smartprefixes_bookmarks.js. */
/* Helper function for debian_contents and debian_file. */
function debian_package (url, t)
{
url = url.replace(/(\w+):(\w+)/g,
function (all, key, val) { t[key] = val; return ""; })
return 'http://packages.debian.org/cgi-bin/search_contents.pl?word='
+ escape(url.replace(/\s*(\S+)\s*/, '$1'))
+ '&searchmode=' + (t.searchmode || 'searchfilesanddirs')
+ '&case=' + (t["case"] || 'insensitive')
+ '&version=' + (t.version || 'stable')
+ '&arch=' + (t.arch || 'i386')
}
/* javascript:debian_contents("%s"); */
function debian_contents (url)
{
return debian_package (url, { searchmode: "filelist" })
}
/* javascript:debian_file("%s"); */
function debian_file (url)
{
return debian_package (url, { searchmode: "searchfilesanddirs" })
}
/* javascript:cvsweb("http://cvsweb.elinks.cz/cvsweb.cgi/", "elinks", "%s"); */
function cvsweb (base, project, url)
{
/* <file>:<revision>[-><revision>] */
url = url.replace(/^(.*):(.*?)(?:->(.*))?$/, "$1 $2 $3");
var parts = url.split(" ");
if (parts[3]) {
elinks.alert('this smartprefix takes only one to three arguments');
return "";
}
var file = parts[0], oldrev = parts[1], newrev = parts[2];
if (!file) {
elinks.alert('no file given');
return "";
}
if (newrev)
return base + project + "/" + file + ".diff"
+ "?r1=" + oldrev + "&r2=" + newrev + "&f=u";
if (oldrev)
return base + "~checkout~/" + project + "/" + file
+ (oldrev != "latest" && "?rev=" + oldrev || "");
return base + project + "/" + file
}
/* javascript:gitweb("http://pasky.or.cz/gitweb.cgi", "elinks.git", "%s"); */
function gitweb(base, project, url)
{
var parts = url.match(/^(search|summary|shortlog|log|commit|commitdiff|tree|tag)(\s(.*))?/);
var query = '?p=' + project;
if (parts) {
query += ';a=' + parts[1];
/* If the extra arg is not for searching assume it is an ID. */
if (parts[1] == 'search' && parts[3])
query += ';s=' + escape(parts[3]);
else if (parts[3])
query += ';h=' + escape(parts[3]);
} else {
query += ';a=summary';
}
return base + query;
}
/* javascript:gmane("%s") */
function gmane (url)
{
var v = url.split(' ');
var group = v[0], words = v.slice(1).join(' ');
if (!words) return "";
return "http://search.gmane.org/search.php?query=" + words
+ "&group=" + group;
}
/* javascript:bugzilla('http://bugzilla.elinks.cz/', "%s"); */
function bugzilla (base_url, arguments)
{
if (!arguments || arguments == '') return base_url;
if (arguments.match(/^[\d]+$/))
return base_url + 'show_bug.cgi?id=' + arguments;
return base_url + 'buglist.cgi?short_desc_type=allwordssubstr'
+ '&short_desc=' + escape(arguments);
}

View File

@ -38,3 +38,12 @@ h1 {
/* Further, give it a pretty colour: */
color: lightgoldenrod !important;
}
/* The following specifies colors used in the HTML highligting. */
document { color: yellow }
element { color: lightgreen }
entity-reference { color: red }
proc-instruction { color: red }
attribute { color: magenta }
comment { color: aqua }
cdata-section { color: orange2 }

View File

@ -32,7 +32,7 @@ different config format, I work on this.]
You can find the snapshot Debian packages at
ftp://yikes.tolna.net/pub/linux/release/debian/
Homepage is http://elinks.or.cz/
Homepage is http://elinks.cz/
-- Peter Gervai <grin@tolna.net>, Thu, 9 Oct 2003 01:17:26 +0200
@ -46,7 +46,7 @@ A: Please check the menus. Download manager is under Tools>Download, proxy
(with contribution by Jonas Fonseca)
Q: The "move" doesn't work in the bookmark manager.
A: Read <http://elinks.or.cz/documentation/bookmarks.txt>
A: Read <http://elinks.cz/documentation/html/manual.html-chunked/ch04.html>
to learn how to use this unintuitive feature.
(contributed by Miciah Dashiel Butler Masters)

2
debian/control.in vendored
View File

@ -17,4 +17,4 @@ Description: advanced text-mode WWW browser
language, IPV6 and has many other features. ELinks is linked against
GNUTLS to prevent license issues.
.
Homepage: http://elinks.or.cz/
Homepage: http://elinks.cz/

View File

@ -130,7 +130,7 @@ doc-dirs:
# $(MAN_DIR) intentionally left out
clean-local:
$(RM) -r $(HTML_DIR) $(XML_DIR) $(TXT_DIR) $(PDF_DIR) *.tmp
@$(RM) -r $(HTML_DIR) $(XML_DIR) $(TXT_DIR) $(PDF_DIR) *.tmp
# Autogenerated asciidoc files.

View File

@ -217,17 +217,17 @@ Triggered When:
Arguments:
unsigned char **html, int *html_len, struct session *ses, unsigned char *url
struct session *ses
struct cache_entry *cached
Description:
Makes it possible to fix up bad HTML code, remove tags etc. The HTML source
is changed by making @html point to the new source. If @html is changed the
event propagation should be ended and @html_len should be updated to the new
length of the document content.
Possible values for @html includes:
- new document content in a dynamically allocated string; or
- NULL to keep the content unchanged.
Makes it possible to fix up bad HTML code, remove tags etc. The parameter
cached is guaranteed to have a single fragment. The HTML source is changed
by replacing this fragment:
add_fragment(cached, 0, new_string, new_len);
normalize_cache_entry(cached, new_len);
-------------------------------------------------------------------------------
Name: quit

View File

@ -1,7 +1,7 @@
top_builddir=../../..
include $(top_builddir)/Makefile.config
elinks.1: $(srcdir)/elinks.1.in $(top_srcdir)/configure.in
elinks.1: $(srcdir)elinks.1.in $(top_srcdir)/configure.in
cd $(top_builddir) && \
CONFIG_FILES="$(RELPATH)$@" CONFIG_HEADERS= $(SHELL) ./config.status

View File

@ -1,6 +1,6 @@
top_builddir=../../..
include $(top_builddir)/Makefile.config
MAN5 = $(srcdir)/elinks.conf.5 $(srcdir)/elinkskeys.5
MAN5 = $(srcdir)elinks.conf.5 $(srcdir)elinkskeys.5
include $(top_srcdir)/Makefile.lib

View File

@ -395,6 +395,22 @@ CONFIG_CSS=yes
CONFIG_HTML_HIGHLIGHT=no
### ECMAScript (JavaScript) Browser Scripting
#
# By enabling this feature, certain parts of ELinks, such as the goto URL
# dialog, may be extended using ECMAScript (aka. JavaScript) scripts. This can
# be useful to optimise your usage of ELinks.
#
# For example you can define shortcuts (or abbreviations) for URLs of sites you
# often visit by having a goto URL hook expand them. This can also be achieved
# with the URI rewrite feature (CONFIG_URI_REWRITE), however it is not as
# powerful as doing it with scripting.
#
# Default: enabled if Spidermonkey is found
CONFIG_SM_SCRIPTING=yes
### Mouse Support
#
# ELinks may be controlled not only by keyboard, but also by mouse to quite some

1
po/.gitignore vendored
View File

@ -1,2 +1,3 @@
*.gmo
elinks.pot
potfiles.list

View File

@ -11,15 +11,16 @@ MSGMERGE = msgmerge
# xgettext)
POTFILES_ABS_LIST = potfiles.list