[qutebrowser] Enabling scripts per domain

Gerard Lally gerard.lally at gmail.com
Wed Feb 12 13:25:49 CET 2020


Isaac, Florian:

Thank you for your replies.

Yes, as Florian says, my question was about managing and selectively
enabling JavaScript coming from third-party hosts rather than the page
itself.

Florian: I didn't realise tSH allows all JS on the current page, no
matter where that JS is coming from. It seems to me that tSH (with all
JS blocked by default) adds an exception for the 1st-party domain to
autoconfig.yml, but not for 3rd-party domains. This was why I assumed
JS only from the 1st-party domain was being allowed.

I am still very impressed with this browser. Keep up the good work.

Gerard

On Mon, 10 Feb 2020 at 16:51, Florian Bruhin <me at the-compiler.org> wrote:
>
> Hey Gerard and Isaac,
>
> On Thu, Feb 6, 2020 at 1:05 AM Gerard Lally <gerard.lally at gmail.com> wrote:
> > This is a very nice browser. Very impressed so far. A small monthly
> > donation on its way if you can solve the following problem.
> >
> > I have JavaScript disabled by default, and I enable it per domain with
> > tSH -- this adds a permanent exception to allow JS for the parent
> > domain.
>
> Note that tSH (and the related bindings) allows JS for the current page, no
> matter where that JS is coming from.
>
> > What I'd like to know is, is there a way of monitoring JS from other
> > domains that the page does not load? For example, I would like to
> > allow JS for a page at the domain independent.ie, and also for some
> > (but not all) other domains that the browser might want to load with
> > this page -- twitter.com to allow images included in the story, for
> > example.
> >
> > With uMatrix on Vivaldi I can see the list of domains a web page tries
> > to load, and I can allow the few I want, in addition to the 1st-party
> > domain and subdomains.
> >
> > Is there a way of watching these domains on qutebrowser and adding
> > them to the exception list?
>
> This isn't possible right now I'm afraid - here's an issue about it:
> https://github.com/qutebrowser/qutebrowser/issues/28
>
> Note that there's an unofficial project (jmatrix) which does that, though:
> https://gitlab.com/jgkamat/jmatrix
>
> However, it's not supported in any way, and might make qutebrowser unstable.
> If things break, you get to keep both pieces ;-)
>
> On Sat, Feb 08, 2020 at 07:13:16PM -0500, Isaac Pei wrote:
> > perhaps one way to do this is to have customized open command (mapped to
> > some specific key):
> >         When opening a url, checking against the  list in configuration
> > file:
> >                If the list is in 'blocked javascript' list, then open the
> > tab with the javascript disabled.
> >
> > I don't know the internal of qutebrowser well, but guess this might be a
> > simple approach that can be solved with python.
> > For 'real-time' turning off/on javascript or other features, it is probably
> > more involved. But guess this simpler hack will meet most / 95% of the
> > scenario?
>
> Like Gerard mentioned in the original mail, toggling JavaScript for a given
> webpage is something qutebrowser can do since around two years. The question
> was about managing (and selectively enabled) JavaScript coming from third-party
> hosts rather than the page itself.
>
> Florian
>
> --
> me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org
>        https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
>        GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
>              I love long mails! | https://email.is-not-s.ms/



More information about the qutebrowser mailing list