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

Suggestions #3

Open
BrontoRed opened this issue Jan 26, 2017 · 11 comments
Open

Suggestions #3

BrontoRed opened this issue Jan 26, 2017 · 11 comments

Comments

@BrontoRed
Copy link

Hi and thank you for such a wonderful add-on.
Just wanted to suggest some extension of add-on's functions:

  1. Can you make it work on other sites that are using MediaWiki engine? Especially interesting for me: wikitravel.org, lurkmore.to
  2. Is it possible to show previews of linked articles on Wikipedia, when you hover a link to an article not only on Wikipedia, for example, on this link
@NiklasGollenstede
Copy link
Owner

Sorry for the delayed reply.

Yes, I want to implement both things you ask for.
Currently I try to find a general concept that allows that plus additional content providers, is easy enough for users to manage AMD not to resource-hungry ...

@BrontoRed
Copy link
Author

BrontoRed commented Mar 9, 2017

I tried your new beta version of Wikipedia Peek (2.8.4b1), which has the above mentioned functions. It is too agressive, working on most sites, even when it's not supposed to.
Maybe consider adding white-list for sites/links, where Wikipedia Peek is allowed to work.

@NiklasGollenstede
Copy link
Owner

Thanks for the feedback!

It does have those white-lists, one for the pages on which it shows previews, and one for the links which it shows previews for. The latter one might be a bit to hard to find.
In the beta version, booth include <all_urls> by default. (I want to know where it works and where not.) I will probably change those default values in the next release version.

I think I will also add a different trigger method. Something like right-click may be better than hover ...

EDIT: Wow. I wrote this a few days ago and forgot to hit "Comment" -.- . At least GitHub saved the text.

@BrontoRed
Copy link
Author

I could not find white-lists in Wikipedia Peek setup menu.
Articles on http://lurkmore.to have "prequote" and "quote" classes (example) before the main text. Wikipedia Peek shows them instead of article preview.
Links on articles from external sites are opened in mini windows. Is that the intended behaviour?
Changing trigger method is not a good idea, cause main advantage of Wikipedia Peek is quick preview without mouse clicking.

@NiklasGollenstede
Copy link
Owner

I could not find white-lists in Wikipedia Peek setup menu.

That's strange. I uploaded 2.8.5b9 with some additional explanations. Maybe you can find it now.

Articles on http://lurkmore.to have "prequote" and "quote" classes before the main text. Wikipedia Peek shows them instead of article preview.

Yupp. That site doesn't support the Wikipedia APIs to get content. Therefore it falls back to the Readability.js loader (see the options). That thing is very generic, and extracting content from pages is not simple.
What I currently use is the summary it extracts. Maybe it should rather use the first paragraph ...
This sort of thing will require quite some experimentation.

Links on articles from external sites are opened in mini windows. Is that the intended behaviour?

Its actually not links on sites that have a CSP that disallows some iframe content. In those cases it is impossible to display the inline preview and a window will pop up instead.

Changing trigger method is not a good idea, cause main advantage of Wikipedia Peek is quick preview without mouse clicking.

I don't think a single click is too much effort, but it would be optional either way.

@BrontoRed
Copy link
Author

I figured out why I could not find settings of Wikipedia Peek. That's a compatibility issue with All-in-One Sidebar addon. Here is what I saw. When opened in standart Add-ons menu everything is fine.

@NiklasGollenstede
Copy link
Owner

Interesting. The 500 denotes an unexpected error. So unexpected that I didn't even add a proper error message ...

@BrontoRed
Copy link
Author

If I remove <all_urls> in Included Sites, then I have to manually enable Wikipedia Peek on every site with links to Wikipedia articles. That is weird, why don't use the same rules for all links and Included Sites? Toolbar button will become useless.

@NiklasGollenstede
Copy link
Owner

Well, if you want it to be active on all sites, then you shouldn't remove the <all_urls> from the Included Sites.
If you want to see fewer previews for all kinds of sites, of which a good portion will be useless, you should remove the <all_urls> from Content Loader Modules > Readability.js. That will stop the extension from trying to load a preview for literally every URL.

@BrontoRed
Copy link
Author

Great! Thank you.
Found one link, which don't work: here
Wikipedia Peek is enabled, added http://*.wikipedia.org/* and no result.

@NiklasGollenstede
Copy link
Owner

NiklasGollenstede commented Mar 14, 2017

Yeah. The link itself is fine, but the page somehow hides the preview. In fallback mode, the pop-up window works. I'll look into that some time later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants