Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per domain settings #27

Closed
The-Compiler opened this issue Oct 1, 2014 · 64 comments
Closed

Per domain settings #27

The-Compiler opened this issue Oct 1, 2014 · 64 comments

Comments

@The-Compiler
Copy link
Member

@The-Compiler The-Compiler commented Oct 1, 2014

For all settings where this makes sense, the setting should be configurable per domain (or probably even protocol/domain/port triple).

This will make a lot of things easier:

  • NoScript is essentially done then
  • RequestPolicy is a lot easier
  • etc.
@The-Compiler The-Compiler self-assigned this Oct 1, 2014
@Ram-Z
Copy link
Contributor

@Ram-Z Ram-Z commented Dec 15, 2014

This also deals with custom stylesheets.

IMHO it's best to configure with regexes against the entire URI.

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Feb 25, 2015

#499 should be done first. Setting the milestone to v0.3 as I really want to see this, but should get v0.2 out first.

@iggy
Copy link
Contributor

@iggy iggy commented Mar 29, 2015

A nice addition to this would be "force https per domain".

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Mar 29, 2015

@iggy - also see #335 for that :)

@The-Compiler The-Compiler mentioned this issue May 18, 2015
@The-Compiler The-Compiler modified the milestones: soon, v0.3 Jun 16, 2015
This was referenced Sep 16, 2015
@The-Compiler The-Compiler removed their assignment Oct 1, 2015
vyp added a commit to vyp/dots that referenced this issue Nov 21, 2015
stylesheet

Of course, this means that attempting to use any of these fonts on *any*
site will result in it being replaced with the selections here.

Ideally this should only be done on particular sites as seen fit. This
can be fixed when qutebrowser gains the ability to have per-domain
settings [1].

[1]: qutebrowser/qutebrowser#27
@The-Compiler The-Compiler modified the milestones: config revolution, soon Nov 25, 2015
@rcorre
Copy link
Contributor

@rcorre rcorre commented Mar 20, 2016

from the mailing list discussion: per-domain user-agents would be useful (right now I need one user-agent for google hangouts and another for github).

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented May 13, 2016

Note to myself so this doesn't get lost; a hack to use possibly use a QWebEngineUrlRequestInterceptor per page (e.g. for headers):

16:59 <The-Compiler> carewolf, Emdek: Looking at QTBUG-53372 I wonder... would it be possible/useful to be able to attach an arbitrary identifier (say, a QString, think e.g. UUID) to a request (and sub-requests?) to be able to identify them in different places, like in a QWebEngineUrlRequestInterceptor?
16:59 <qt_gerrit> carewolf, Custom load options - https://bugreports.qt.io/browse/QTBUG-53372 (Reported)
16:59 <The-Compiler> just brainstorming here though :)
17:00 <@carewolf> you could just put anything in there already, and rewrite them in the interceptor if you want
17:01 <The-Compiler> carewolf: put anything in where?
17:02 <@carewolf> you can use invalid URLs and rewrite them to something valid
17:02 <@carewolf> I think (haven't tried)
17:03 <The-Compiler> that's... horrib... eh, I mean really clever.
17:03 <The-Compiler> ;)
17:04 <@carewolf> You can look at NavigatorController:LoadURLParams for what we can pass to Chromium
@MichaelMackus
Copy link

@MichaelMackus MichaelMackus commented Dec 8, 2017

I agree. The main use-case for this for me would be a NoScript-like setup. Is there any way to hack the enable javascript setting like @haasn did here?

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Dec 8, 2017

Probably not as easily as there isn't a simple mechanism for per-domain settings in QtWebKit/QtWebEngine, qutebrowser needs to adjust them at the right point in time by itself.

@The-Compiler The-Compiler modified the milestones: v1.1.0, v1.2.0 Jan 15, 2018
@tidux
Copy link

@tidux tidux commented Jan 19, 2018

Something else needed for full uBO-equivalent functionality: gorhill/uBlock#3374

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Jan 20, 2018

@tidux That seems unrelated to per-domain settings and would probably better fit in #29. The domains should probably be submitted to the blocklists qutebrowser uses. Also, note that this probably applies to qutebrowser too:

For Chromium-based browsers, there is no solution until their extensions API allows for modifying the response body data on the fly.

@ghost
Copy link

@ghost ghost commented Jan 22, 2018

Would it be possible to disable remote fonts per domain? If so, would it also be possible to disable them by default and then enable them per domain? Or is it impossible because the backend handles that?

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Jan 22, 2018

@Zekario Should be possible with QtWebEngine, see #2626.

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Feb 20, 2018

Sooo... good news! After some hard work over the past few days, this is now nearly ready! 🎉

whoa

It still has some issues (like needing a refresh for some settings with QtWebEngine), and only supports a few settings (search for "pattern"). However, I think it's ready to merge in this stage with further improvements coming later after it's in the master branch.

If you want to try it out (and I'd love some feedback!), check the per-url branch. Note that you should back up your ~/.config/qutebrowser/autoconfig.yml as it'll be migrated to a format the master branch can't read.

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Feb 21, 2018

I now opened a PR for this: #3618 - if you have the time to take a look at it (code/functionality), please do!

@MichaelMackus
Copy link

@MichaelMackus MichaelMackus commented Feb 21, 2018

Sweet! Now that my favorite FF extensions are being abandoned/watered down I'm waiting for this to make qutebrowser my full time browser.

@The-Compiler
Copy link
Member Author

@The-Compiler The-Compiler commented Feb 25, 2018

It's been a while™, but this is finally ready and merged into master! 🎉 I think I found workarounds for most annoying issues I've found (such as needing to reload manually to turn on/off JS). If you notice some issues, please let me know!

The remaining bits are split across various issues:

  • #3622 (various small remaining issues)
  • #2626, #3636 (support for more settings) (nice issue IDs 😆)
  • #28 (support for a second URL in settings, uMatrix-/request-policy like)
@dessalines
Copy link

@dessalines dessalines commented Apr 28, 2018

how do you actually use this then? I'd like to set custom css for a specific site.

@jgkamat
Copy link
Member

@jgkamat jgkamat commented Apr 28, 2018

Right now stylesheets dosen't have patterns implemented, see #3854.

There's examples on setting pattern settings in the configuration documentation, for both :set and config.py. Whether a setting supports patterns is visible on it's :help page.

@jcjordyn130
Copy link

@jcjordyn130 jcjordyn130 commented Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet