[elinks-dev] Re: Re: [elinks-users] turning off image links (e.g. apache's directory listing)

Petr Baudis pasky at ucw.cz
Sat Oct 18 12:50:36 PDT 2003


Dear diary, on Sat, Oct 18, 2003 at 07:32:38PM CEST, I got a letter,
where Johannes Zellner <johannes at zellner.org> told me, that...
> On Thu, Oct 16, 2003 at 12:29:59AM +0200, Johannes Zellner wrote:
> > Hi,
> > 
> > how can I turn off image links e.g. in directory listings of a web
> > server? The images look like
> > 
> >     <img border="0" src="/icons/folder.gif" alt="[DIR]">
> > 
> > I tried:
> > 
> >       set document.browse.images.show_as_links = 0
> >       set document.browse.images.image_link_tagging = 0
> > 
> > This way the images don't get HIGHLIGHTED as links, but when I navigate
> > the document I still get selectable [DIR] links.
> 
> attached is a quick fix which does what I want.
> 
> -- 
> Johannes

> Index: parser.c
> ===================================================================
> RCS file: /var/cvs/elinks/elinks/src/document/html/parser.c,v
> retrieving revision 1.221
> diff -c -w -c -w -r1.221 parser.c
> *** parser.c	14 Oct 2003 18:43:02 -0000	1.221
> --- parser.c	18 Oct 2003 13:08:10 -0000
> ***************
> *** 923,928 ****
> --- 923,929 ----
>   			}
>   		}
>   
> + 		if (d_opt->images) {
>   		    /* This is not 100% appropriate for <img>, but well, accepting
>   		     * accesskey and tabindex near <img> is just our little
>   		     * extension to the standart. After all, it makes sense. */
> ***************
> *** 932,937 ****
> --- 933,939 ----
>   			format.image = join_urls(format.href_base, s);
>   			mem_free(s);
>   		    }
> + 		}
>   
>   		format.title = get_attr_val(a, "title");
>   

It's not quite that simple, I think (just to be safe). Introduced
document.browse.images.show_any_as_links, enjoy the CVS :-).

Thanks for the idea,

-- 
 
				Petr "Pasky" Baudis
.
To get something done, a committee should consist of no more than three
persons, two of them absent.
.
Stuff: http://pasky.ji.cz/



More information about the elinks-dev mailing list