| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* buffer, pager, config: add meta-refresh value, which makes it possible
to follow http-equiv=refresh META tags.
* config: clean up redundant format mode parser
* timeout: accept varargs for params to pass on to functions
* pager: add "options" dict to JS gotoURL
* twtstr: remove redundant startsWithNoCase
|
|
|
|
|
|
|
|
|
|
| |
It works fine AFAICT, just missing VP8 deblocking filters, so lossy
WebP images don't look great.
I have extended the API a bit to allow reading from stdin, not just
paths. Otherwise, it's the same as matanui159/jebp.
TODO: add loop filters
|
|
|
|
| |
and enable it by default.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Mainly things you could already set with [[siteconf]] but not normally.
Also, a `styling' option to disable author styles.
Also, `images' is now documented as an "experimental" option, since it's
halfway usable now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* resize images with stb_image_resize
* use tee for output handle redirection (redirectToFile blocks)
* cache original image files
* accept lseek in sandbox
* misc stbi fixes
For now, I just pulled in stb_image_resize v1. v2 is an extra 150K in
size, not sure if it's worth the cost. (Either way, we can always switch
later if needed, since the API is almost the same.)
Next step: move sixel/kitty encoders to CGI, and cache their output in
memory instead of the intermediate RGBA representation.
|
| |
|
|
|
|
|
|
| |
* preserve alpha in kitty + simplify encoder
* pass unknown image types to stbi (as image/x-unknown) and let it
detect the type
|
|
|
|
|
|
|
| |
Now we have decoders for gif, jpeg, bmp. Also, the in-house PNG decoder
has been replaced in favor of the stbi implementation; this means we
no longer depend on zlib, since stbi comes with a built in inflate
implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* multi-processed and sandboxed PNG decoding & encoding (through local
CGI)
* improved request body passing (including support for output id as
response body)
* simplified & faster blob()/text() - now every request starts
suspended, and OngoingData.buf has been replaced with loader's
buffering capability
* image caching: we no longer pull bitmaps from the container after
every single getLines call
Next steps: replace our bespoke PNG decoder with something more usable,
add other decoders, and make them stream.
|
| |
|
|
|
|
|
|
| |
* refactor form submission
* add options to specify form handling per protocol
* block cross-protocol POST requests
|
|
|
|
|
|
|
|
|
| |
* prepend Mozilla/5.0 to User-Agent; an unfortunate fact is that even
the G-lettered search engine breaks without it, and I've seen sites
that refuse to serve pages at all.
* Add */* to Accept, in the hope that we'll get images more often. (The
ideal solution is to set it to "*/*" when fetching images, but the
API format doesn't let us do this yet; TODO.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous solution had the issue that it switched between "delete
buffer, then move back" and "delete buffer, then move forward" depending
on whether the buffer was the root of the buffer tree, which made its
behavior quite unpredictable.
Now the pager (sort of) remembers the direction you are coming from,
and D moves in that direction. So e.g.:
* Enter, D just moves back to where you were coming from (as before)
* Comma, D deletes the previous buffer, then returns to the current
buffer
If no buffer exists in the target direction, then we alert.
Also, new commands are: `d,' `d.'. They do the same thing the
non-d-prefixed variations do, but also delete the current buffer. Useful
if you're no longer sure where you are coming from, but know where you
want to go. (`d,' in particular is equivalent to w3m's `B'.)
|
|
|
|
| |
We have a markdown converter, so why not use it?
|
| |
|
|
|
|
|
|
|
| |
* add $LOGNAME to the tmp directory name, so that tmpdirs of separate
users don't conflict
* use separate directory for sockets, so that we do not have to give
buffers access to all cached pages
|
| |
|
| |
|
|
|
|
|
|
| |
* use EDITOR environment variable in default config, fix line number
ordering in fallback
* autodetect vi-like editors and add line number
|
|
|
|
|
|
|
| |
* Replaced the `pcanvas' comparison with a much simpler tracking of
the first damaged cell in writeGrid, which is significantly faster.
* Removed emulate-overline: it's of too little utility compared to the
maintenance burden it caused.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we didn't actually free the main JS runtime, probably because
you can't do this without first waiting for JS to unwind the stack.
(This has the unfortunate effect that code now *can* run after quit().
TODO: find a fix for this.)
This isn't a huge problem per se, we only have one of these and the OS
can clean it up. However, it also disabled the JS_FreeRuntime leak
check, which resulted in sieve-like behavior (manual refcounting is
a pain).
So now we choose the other tradeoff: quit no longer runs exitnow, but
it waits for the event loop to run to the end and only then exits the
browser. Then, before exit we free the JS context & runtime, and also
all JS values allocated by config.
Fixes:
* fix `ad' flag not being set for just one siteconf/omnirule
* fix various leaks (since leak check is enabled now)
* use ptr UncheckedArray[JSValue] for QJS bindings that take an array
* allow JSAtom in jsgetprop etc., also disallow int types other than
uint32
* do not set a destructor for globals
|
|
|
|
|
|
|
|
| |
* add CSSStyleDeclaration setter
* move ident maps directly into enums
* more complete CSSComputedValue stringifier
* turn canvas into a pseudo-image in cascade
* set canvas to inline-block
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* png: add missing filters, various decoder fixes
* term: fix kitty response interpretation, add support for kitty image
detection
* buffer, pager: initial image display support
Emphasis on "initial"; it only "works" with kitty output and PNG input.
Also, it's excruciatingly slow, and repaints images way too often.
Left undocumented intentionally it for now, until it actually becomes
useful. In the meantime, adventurous users can find out themselves why:
[[siteconf]]
url = "https://.*"
images = true
|
|
|
|
|
| |
FF does it this way as well, and it seems sr.ht depends on it being
padding instead of margin.
|
|
|
|
|
|
|
| |
* URI-decode path name for local files in default config
* (ab)use mailcap command quoting for passing params to editor command
instead of replicating it badly in formatEditorName
* rename mailcap enums
|
|
|
|
|
|
|
| |
Use content type attributes so e.g. git.cgi can set the title even with
a text/x-ansi content type.
(This commit also fixes some bugs in content type attribute handling.)
|
|
|
|
| |
as described in <https://todo.sr.ht/~bptato/chawan/6>
|
|
|
|
|
| |
this way its output can be embedded into documents without a pointless
DT declaration
|
|
|
|
|
|
|
|
|
| |
* `s{Enter}' now saves link, and `sS' saves source.
* Changed ;, +, @ to g0, g$, gc so that it's somewhat consistent with
vim (and won't conflict with ; for "repeat jump to char")
* Changed (, ) to -, + so that it doesn't conflict with vi's
"previous/next sentence" (once we have it...)
* Add previously missing keybindings to about:chawan
|
|
|
|
|
|
|
|
| |
I haven't seen a single OS-shipped mailcap file yet that would be
suitable for use with Chawan. The one on Debian wants to open every
text file with vim; the one in FreeBSD ports is straight up broken.
mime.types works much better and thus stays.
|
|
|
|
| |
This way, we can use it everywhere (e.g. in mailcap).
|
|
|
|
| |
we use MAPPED_URI_* now
|
|
|
|
| |
Useful when browsing plaintext files; w3m has it too.
|
|
|
|
| |
they all use the same CGI script (with varying success)
|
|
|
|
|
|
|
| |
As simple as it could be; no download panel yet.
Also, remove the xdg-open default mailcap entry; it's better to just
save by default.
|
|
|
|
| |
useful for debugging
|
| |
|
|
|
|
|
|
| |
only for source for now, rendered document is a bit more complicated
(also, get rid of useless extern/editor module)
|
|
|
|
|
|
|
| |
* do not use query string for arguments
* accept symlinks as man binaries
* improve error message reporting
* run all regexes on the original line
|
|
|
|
|
| |
we just treat them as img tags. lazy, but works suprisingly well -- so
long as the server sends us a Content-Type, anyway.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depending on Perl just for this is silly.
Now we use libregexp for filtering basically the same things as
w3mman2html did. This required another patch to QuickJS to avoid
pulling in the entire JS engine, but in return, we can now run regexes
without a dummy JS context global variable.
Also, man.nim now tries to find a man command on the system even if it's
not in /usr/bin/man.
|
|
|
|
|
|
| |
* put attrs pointer in state
* simplify width()
* use unsigned int as ptint to avoid UB
|
|
|
|
|
|
|
|
| |
left/right never really worked correctly, is non-standard, and the
only browser that supported it (Firefox) removed it years ago.
bottom was adding the table width to its offset instead of the height,
that is now fixed.
|
| |
|
|
|
|
|
|
|
| |
Split up load into loadSubmit, gotoURL: loadSubmit is a replacement for
load(s + '\n'), and gotoURL is a load that does no URL expansion.
Also, fix a bug where load("\n") would crash the browser.
|