diff --git a/web/regex_demo.html b/web/regex_demo.html
index 90ae22f..467e8ce 100644
--- a/web/regex_demo.html
+++ b/web/regex_demo.html
@@ -2,7 +2,7 @@
-WebPerl Regex Demo
+WebPerl Regex Tester
@@ -28,13 +28,15 @@ pre {
display: flow-root;
}
pre.samptxt {
- padding: 2px 20px 2px 2px;
+ padding: 2px;
display: inline-block;
}
textarea.samp_ta {
min-width: 10em;
min-height: 1em;
- max-width: calc(100% - 20px);
+ max-width: calc(100% - 1.5em);
+ width: 100%;
+ border: 1px solid grey;
padding: 1px;
display: inline-block;
}
@@ -54,6 +56,8 @@ textarea.samp_ta {
+
@@ -63,17 +67,19 @@ use 5.028;
use WebPerl qw/js/;
my $jq = js('jQuery');
+$jq->('#perlinfo')->text("perl $^V");
+
sub sample_init {
my $samp = shift;
my $samptxt = $samp->children(".samptxt");
my $samp_ta = $jq->('', {class=>"samp_ta"});
$samp_ta->hide();
$samp_ta->appendTo($samp);
- my $closebtn = $jq->('', {html=>"🗙",class=>"closebtn"});
+ my $closebtn = $jq->('', {html=>"🗙",class=>"closebtn",
+ title=>"Delete Sample"});
$closebtn->appendTo($samp);
$samp->click(sub {
return if $samp_ta->is(':visible');
- $samp_ta->width( $samp->width - $closebtn->width - 4 );
$samp_ta->height($samptxt->height);
$samp_ta->val($samptxt->text);
$samptxt->hide;
@@ -90,7 +96,7 @@ sub sample_init {
$samp_ta->on('input', sub {
$samp_ta->height($samp_ta->[0]->{scrollHeight}-2); # subtract padding
});
- $closebtn->click(sub { $samp->remove });
+ $closebtn->click(sub { $samp->remove; update() });
}
$jq->(".sample")->each(sub{ sample_init($jq->($_[1])) });
@@ -196,13 +202,15 @@ js('$(window)')->on('hashchange',\&hashchange);
Perl Regex Tester
-- powered by
WebPerl
+- powered by WebPerl (beta)
-m{m{}
+ >
@@ -215,11 +223,13 @@ js('$(window)')->on('hashchange',\&hashchange);
Add Sample
-