-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Question regarding automatic url redirection #3933
Comments
Currently, there's no way to do this built-in. Some people have userscripts which rewrite target urls on the page (for example, youtube->hooktube), but the userscripts that I've seen have been fairly rudementary (and better ones could be made). You could also override the :open command through the config.py system (unsupported). |
The userscript option isn't really that great for me since I'm on qtwebkit and I'm not sure I understand the second suggestion. |
er, sorry, I messed up terminology: There are rewriting greasemonkey scripts (not userscripts), which should work on qtwebkit and webengine (although I haven't tried). Here is one. The reason why I don't like this approach is that the userscripts I've seen aren't well designed, and don't take into account changes on the page by js. The script would have to set up a mutationobserver or something similar. I think this might be possible to implement, there's no facility for doing this right now. The implementation would probably be similar to this PR: https://github.com/qutebrowser/qutebrowser/pull/3864/files (in that it would have to block a request that matches and fire a new, translated one). |
Yes sorry I think it's actually my fault because I did not provide the reason why qtwebkit is an impediment and I'm under the impression that userscript and greasemonkeys scripts are the same thing. I would very much appreciate if you could provide me with something to read regarding the difference. Aren't greasemonkey scripts just usercripts that target that specific browser addon ? |
Unfortunately "userscript" is an overloaded term: qutebrowser uses "userscript" in the dwb sense, which is a way of creating simple scripts that control qutebrowser. they are documented here. Greasemonkey is a separate concept, which is (outside of qb) sometimes referred to as userscripts, which is essentially js running in the page. There's a good greasemonkey entry in the faq. Greasemonkey is just a way to run js scripts in the browser. I think that greasemonkey scripts do run on the end of page load, but maybe support could be added for other targets like on webengine. Webkit does provide some signals such as domcreation that could be used. |
Thanks for the response. I'll try my hand with a userscript and I'll post here if I succeed. |
I think this is something which should be exposed via a plugin API (#30) once that exists. Before that (e.g. via a config), I can't think of a good way to expose this and rewrite URLs without plugin code to change the URLs. |
Is there any way I can redirect a domain to another domain ?
Like for example I want to automatically redirect all {string}.reddit.com/{etc} to i.reddit.com/{etc}
The text was updated successfully, but these errors were encountered: