mothra: add keyboard command j to jump to page from the list of previously viewed pages
This commit is contained in:
parent
126290e423
commit
93ea257aa3
2 changed files with 23 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
.TH MOTHRA 1
|
.TH MOTHRA 1
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mothra \- retrieve World-Wide Web files
|
mothra \- retrieve and display World-Wide Web files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B mothra
|
.B mothra
|
||||||
[
|
[
|
||||||
|
@ -50,6 +50,15 @@ given on the command line, defaulting to
|
||||||
the environment variable
|
the environment variable
|
||||||
.BR $url .
|
.BR $url .
|
||||||
.PP
|
.PP
|
||||||
|
There are a number of options:
|
||||||
|
.TP
|
||||||
|
.B -d
|
||||||
|
Debug mode.
|
||||||
|
.TP
|
||||||
|
.B -v
|
||||||
|
Verbose mode. Causes HTML errors to appear in
|
||||||
|
.B $home/lib/mothra/mothra.err
|
||||||
|
.PP
|
||||||
Mothra uses
|
Mothra uses
|
||||||
.IR webfs (4)
|
.IR webfs (4)
|
||||||
to retrive the url data. The mountpoint, default is
|
to retrive the url data. The mountpoint, default is
|
||||||
|
@ -101,6 +110,11 @@ Collapse or expand the navigation boxes at the top of the browser window.
|
||||||
.BI g " url
|
.BI g " url
|
||||||
Get the page with the given URL.
|
Get the page with the given URL.
|
||||||
.TP
|
.TP
|
||||||
|
.BI j " n
|
||||||
|
Jump to page
|
||||||
|
.I n
|
||||||
|
from the list of previously viewed pages.
|
||||||
|
.TP
|
||||||
.B r
|
.B r
|
||||||
Reload the current page.
|
Reload the current page.
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include <draw.h>
|
#include <draw.h>
|
||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <keyboard.h>
|
#include <keyboard.h>
|
||||||
|
@ -539,6 +540,13 @@ void docmd(Panel *p, char *s){
|
||||||
}
|
}
|
||||||
else geturl(s, GET, 0, 1, 0);
|
else geturl(s, GET, 0, 1, 0);
|
||||||
break;
|
break;
|
||||||
|
case 'j':
|
||||||
|
s=arg(s);
|
||||||
|
if(isdigit(s))
|
||||||
|
geturl(www(atoi(s)-1)->url->fullname, GET, 0, 0, 0);
|
||||||
|
else
|
||||||
|
message("no url selected");
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
s = arg(s);
|
s = arg(s);
|
||||||
if(*s == '\0' && selection)
|
if(*s == '\0' && selection)
|
||||||
|
|
Loading…
Reference in a new issue