How can you use Javascript in terminal for w3m?
Asked Answered
L

4

12

I found the text browser w3m which is the best so far in my opinion. However, it is main problem is Javascript.

I cannot see comments at all in Stackoverflow when I use it.

I am not sure what is the restriction in letting Javascript to be in terminal.

How can you enable at least some of JavaScript for Terminal such that comments are visible?

Leomaleon answered 19/4, 2009 at 1:27 Comment(0)
O
13

Javascript requires a Javascript interpreter. If your user-agent doesn't understand a particular kind of scripting, it simply ignores it. To get a minimal level of support, try the w3m-js extension.

Optometry answered 19/4, 2009 at 1:34 Comment(3)
How can you use that code in terminal? Where do I need to put it to run w3m nicely?Lamarckian
You'll have to download, compile and install the program w3m-js and all the libraries it requires.Antonantone
web.archive.org/web/20101124213553/http://abe.nwr.jp/w3m/… is the most recent non-dead Archive link for abe.nwr.jp/w3m/w3m-js.html but even the archive link is not that helpful since links on that page do not really go anywhere.Somerset
F
5

Unfortunately w3m doesn't support JavaScript at all.

Freiman answered 19/4, 2009 at 1:33 Comment(0)
C
0

You can try browsh - https://github.com/browsh-org/browsh

It's amazing, A fully interactive, real-time, and modern text-based browser rendered to TTYs and browsers

It works great with all sites i tested, You can run it using docker run --rm -it browsh/browsh,

Then when it starts use CTRL + L and it will focus on the URL bar, and let you browse to where ever you'd like.

You can find more keybindings here - https://www.brow.sh/docs/keybindings/

Chemosynthesis answered 9/7, 2024 at 12:27 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Merissa
I
-2

Try Conkeror

Masi -- I'd recommend taking a look at Conkeror, which is basically Firefox with Emacs keybindings. If you want a keyboard driven UI with Javascript, it's your best bet:

http://conkeror.org

http://www.saltycrane.com/blog/2008/01/firefox-for-emacs-users/

The frontpage could use a makeover, but once you download and install it you'll wonder why you never tried it before...

(and if you're a vim user, you could try vimperator).

Ileum answered 19/4, 2009 at 8:12 Comment(2)
OP said "letting Javascript to be in terminal" so does Conkeror work under a terminal or does it require an X connection?Somerset
@anonymous2, That is why I believe that Conkeror does not apply to the OP's question. I believe the intent is that the web content needs to be "rendered" into terminal windows such as Linux consoles and dumb terminals that, by design, should not require an X connection.Somerset

© 2022 - 2025 — McMap. All rights reserved.