GNOME Bugzilla – Bug 582550
Wikipedia: user style for compact display
Last modified: 2020-03-17 08:33:02 UTC
WebKit provides a way to use user-supplied style sheets to override the website's defaults. This way, the Wikipedia page can be tweaked for a better experience when used embedded.
Created attachment 134609 [details] Screenshot Screenshot of a quick proof-of concept.
Created attachment 134610 [details] [review] Patch 0.1 Quick patch. The binding does not provide an easy way to set user-stylesheet-uri but I still wonder if there is some other way to do this... Also I wonder what to do with the .css file.
Created attachment 134611 [details] Sample CSS This CSS hides the top, left and bottom borders of the page as well as some of the content area fields. Maybe a web artist can make this page look sweet in Banshee...
FWIW, Amarok's stylesheet for Wikipedia is here: http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/applets/wikipedia/WikipediaCustomStyle.css?view=markup
Does Amarok strip away parts of the html before displaying? Can't see how this stylesheet would help otherwise :) Btw, hiding at least the search box would also help with the fact that currently the WebKit widget does not handle keypresses... e.g. if you try to type into the search entry you activate Banshee shortcuts (but this should be fixed anyway I think?)
As suggested in bug #582904, we probably should keep the content of "languages" box, to allow the user to access to the article in another language.
(In reply to comment #5) > Btw, hiding at least the search box would also help with the fact that > currently the WebKit widget does not handle keypresses... e.g. if you try to > type into the search entry you activate Banshee shortcuts (but this should be > fixed anyway I think?) This is a Banshee problem, not Webkit - it handles the input fine (try typing an x into it) - Banshee just isn't doing it's ignoring of keybindings when a textentry is focused thing.
Unfortunately the OnKeyPressEvent in Nereid's PlayerInterface is seeing the Focus widget as a WebKit.WebView and not an entry. I can't see a way to find out if it's a form focused or not. We could disable all Banshee key bindings if you have the webkit view focused, but that is less than ideal too.
Review of attachment 134610 [details] [review]: ::: src/Extensions/Banshee.Wikipedia/Banshee.Wikipedia/WikipediaView.cs @@ +47,3 @@ + public Settings () : base () + { + public class Settings : WebKit.WebSettings You should either (a) embed the css as a resource or (b) ship the css with banshee. For (a) see AssemblyResource class and its usages. For (b) see how files in ./data are handled.
*** Bug 611828 has been marked as a duplicate of this bug. ***
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.