From 8b34e7cc402d1db5694525bd04d9c4b2a8b8b90f Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Sat, 3 May 2003 02:07:22 +0000 Subject: [PATCH] - add title attributes to the navigation icons on the navigation bars; this causes some browsers to offer descriptive tooltips when the mouse hovers over the linked icon - clean up the code in this area --- Doc/perl/l2hinit.perl | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl index 6e4b0cbead..0ecb693d80 100644 --- a/Doc/perl/l2hinit.perl +++ b/Doc/perl/l2hinit.perl @@ -141,27 +141,39 @@ sub get_my_icon($) { . " height='32' alt='$text' width='32'>"; } -sub use_my_icon($$) { - my($s,$rel) = @_; - if ($s =~ /\/) { - my $r = get_my_icon($1); - $s =~ s/\/$r/; +sub unlinkify($) { + my $text = "$_[0]"; + $text =~ s|||; + $text =~ s|]*>||i; + return $text; +} + +sub use_icon($$$) { + my($rel,$str,$title) = @_; + if ($title) { + my $s = "$str"; + if ($s =~ /\/) { + my $r = get_my_icon($1); + $s =~ s/\/$r/; + } + $s =~ s/<[aA] /' . "\n" -- 2.50.1