Reader View for Pale Moon

General discussion, compatibility and contributed extensions.

Moderators: satrow, Lootyhoof, Andrew Gilbertson

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Reader View for Pale Moon

Postby Isengrim » Tue Dec 05, 2017 2:13 am

When I migrated from Firefox to Pale Moon, the Reader View feature was one of the things I missed most, and I wasn't really sold on any of the existing options for making a site more readable. So I made my own: an implementation of Firefox Reader View for use as an add-on in the Pale Moon web browser.

This extension adds a button with the Reader Mode icon to the Pale Moon interface. When the add-on detects that a page is compatible with Reader View, the button will enable and the icon will turn blue. Clicking the button will enable Reader View for that page, and the icon will turn purple. Clicking the button again will exit Reader View, and the page will return to normal.

Reader View may also be activated by selecting "Enter Reader View" from the View menu, or by using the keyboard shortcut Ctrl + Alt + R.

Many features in Reader View are identical between Mozilla Firefox and this add-on, such as:

* Parse and render a page cleanly and clutter-free
* Activate with the simple click of a button
* Increase or decrease the line spacing between text
* Increase or decrease the font size
* Choose from light, dark, or sepia color schemes

This add-on comes with a few differences, such as:

* Reading times are based on English only.
* Text to speech/narration is not available.
* Pocket integration is not available.
* Telemetry is not included.

This add-on is available from the Pale Moon add-ons site: https://addons.palemoon.org/addon/readerview/
The source code is available here: https://github.com/ascrod/readerview

Happy reading!

User avatar
gracious1
Astronaut
Astronaut
Posts: 653
Joined: Sun May 15, 2016 5:00 am
Location: snowy upstate NY
Contact:

Re: Reader View for Pale Moon

Postby gracious1 » Tue Dec 05, 2017 2:29 am

Isengrim wrote:When I migrated from Firefox to Pale Moon, the Reader View feature was one of the things I missed most, and I wasn't really sold on any of the existing options for making a site more readable. So I made my own: an implementation of Firefox Reader View for use as an add-on in the Pale Moon web browser. […]

This add-on is available from the Pale Moon add-ons site: https://addons.palemoon.org/addon/readerview/
The source code is available here: https://github.com/ascrod/readerview

Happy reading!


Wow! Nice! Thanks!
ImageBe not the first by whom the new are tried, nor yet the last to lay the old aside.

jars_
Moonbather
Moonbather
Posts: 66
Joined: Tue Dec 27, 2016 12:12 am

Re: Reader View for Pale Moon

Postby jars_ » Tue Dec 05, 2017 6:28 am

Thank you! I did not even know about this feature in FF :D Works fine.
but after instal and restart, the extension icon does not appear in panel and console has errors:

Code: Select all

Метка времени: 05.12.2017 8:17:49
Ошибка: TypeError: button is null
Источник: resource://readerview/ReaderParent.jsm
Строка: 109

Метка времени: 05.12.2017 8:17:49
Ошибка: button is null
Источник: resource://readerview/ReaderParent.jsm
Строка: 109


.. when I manually dragged the icon to the panel, everything is fine.

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Re: Reader View for Pale Moon

Postby Isengrim » Wed Dec 06, 2017 4:04 am

Thanks for the feedback! I have added these issues to the repo and fixes will be in the next release.

User avatar
gracious1
Astronaut
Astronaut
Posts: 653
Joined: Sun May 15, 2016 5:00 am
Location: snowy upstate NY
Contact:

Re: Reader View for Pale Moon

Postby gracious1 » Wed Dec 06, 2017 4:26 am

Isengrim wrote:Thanks for the feedback! I have added these issues to the repo and fixes will be in the next release.


Just a couple of questions...

Does this mean that you are going to push the toolbar button to the Navigation Toolbar? Having a button appear in the Customize dialog rather than right on the toolbar is not necessariliy undesired behavior.

I hope that it doesn't mean that it will put into the URL bar itself, as it is with Fx or Basilisk. I like to be able to decide where to put the button.

Lastly, would it be possible to include a menu item under Tools in the Menu Bar? Some of us prefer to use menus over toolbar buttons. :)

Thanks!
ImageBe not the first by whom the new are tried, nor yet the last to lay the old aside.

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Re: Reader View for Pale Moon

Postby Isengrim » Wed Dec 06, 2017 5:47 am

gracious1 wrote:Does this mean that you are going to push the toolbar button to the Navigation Toolbar? Having a button appear in the Customize dialog rather than right on the toolbar is not necessariliy undesired behavior.

Most likely, yes. I'd rather have the button show up on the UI and be usable right away than to force the user to hunt for it in the Customize menu. I think it's a slightly more user-friendly approach, and most add-ons seem to do this already.

gracious1 wrote:I hope that it doesn't mean that it will put into the URL bar itself, as it is with Fx or Basilisk. I like to be able to decide where to put the button.

Absolutely not! I also enjoy being able to organize my buttons, and allowing others to do the same. ;)

gracious1 wrote:Lastly, would it be possible to include a menu item under Tools in the Menu Bar? Some of us prefer to use menus over toolbar buttons. :)

I just resolved this issue a little while ago - the code for adding the menu item was missing. It will be located under the View menu, identical to where it is in Firefox/Basilisk. There is also a Ctrl+Alt+R keyboard shortcut, which works in the current version.

User avatar
gracious1
Astronaut
Astronaut
Posts: 653
Joined: Sun May 15, 2016 5:00 am
Location: snowy upstate NY
Contact:

Re: Reader View for Pale Moon

Postby gracious1 » Wed Dec 06, 2017 7:21 am

gracious1 wrote:…push the toolbar button to the Navigation Toolbar?

Isengrim wrote:Most likely, yes. I think it's a slightly more user-friendly approach…

That depends on the user ;) , but I can see how it would be confusing to those who expect it.
Isengrim wrote: …and most add-ons seem to do this already.

To my consternation. :silent: ;) :mrgreen: Seriously, though, when you do this, could you please do it in such a way that it doesn't force a hidden toolbar to appear? I had a problem with this with another extension. At first, I thought there was bug in the toolbar function, because there had been some issues before of toolbars unhiding themselves, but it turns out that it was the extension forcing the toolbar to unhide. The developer graciously modified his extension to resolve the issues. (Bad pun alert. :shifty:)

Isengrim wrote:{re keeping customizable button}

Thanks! :thumbup:

Isengrim wrote:[Reader command] will be located under the View menu, identical to where it is in Firefox/Basilisk.

Ah, of course, that makes a lot more sense than Tools. Thanks for including this! :thumbup:

Isengrim wrote:There is also a Ctrl+Alt+R keyboard shortcut, which works in the current version.

Hmm... :problem: You may wish read why Moonchild removed the Ctrl+Alt+R shortcut from the Restart command, as that particular combination caused serious problems for some users. (This may warrant at least providing an option to disable it and/or reconfigure it.)
Moreover, it also conflicts with current PM add-ons like Restart Manager and Restart Browser which reinstate the Ctrl+Alt+R shortcut to Restart. (To be fair, Restart Manager will let you modify the hotkey to any letter A-Z, but no numbers or punctuation marks. Restart Browser, however, is not configurable.) Just something to consider.

HTH, and thanks again for making this extension available for PM.
Cheers!
ImageBe not the first by whom the new are tried, nor yet the last to lay the old aside.

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Re: Reader View for Pale Moon

Postby Isengrim » Wed Dec 06, 2017 11:16 pm

gracious1 wrote:...could you please do it in such a way that it doesn't force a hidden toolbar to appear?

I'll keep that in mind!

gracious1 wrote:Hmm... :problem: You may wish read why Moonchild removed the Ctrl+Alt+R shortcut from the Restart command, as that particular combination caused serious problems for some users. (This may warrant at least providing an option to disable it and/or reconfigure it.)
Moreover, it also conflicts with current PM add-ons like Restart Manager and Restart Browser which reinstate the Ctrl+Alt+R shortcut to Restart. (To be fair, Restart Manager will let you modify the hotkey to any letter A-Z, but no numbers or punctuation marks. Restart Browser, however, is not configurable.) Just something to consider.

I hadn't thought about that, but it's a good point. I might bring this issue up with Mozilla, since that shortcut is what Firefox uses today, and it could potentially affect any of their users (or users of derived browsers) who also use an AltGr keyboard layout.

User avatar
LimboSlam
Board Warrior
Board Warrior
Posts: 1001
Joined: Mon Jun 09, 2014 4:43 am
Location: USA

Re: Reader View for Pale Moon

Postby LimboSlam » Thu Dec 07, 2017 3:47 am

Actually, I enjoyed Firefox reader view in the url bar. Is it possible to make that option available?

Thanks for this cool add-on, and keep up the good work! :) :thumbup:
With Pale Moon by my side, surfing the web is quite enjoyable and takes my headaches away! :)
God is not punishing you, He is preparing you. Trust His plan, not your pain.#‎TrentShelton #‎RehabTime

jars_
Moonbather
Moonbather
Posts: 66
Joined: Tue Dec 27, 2016 12:12 am

Re: Reader View for Pale Moon

Postby jars_ » Thu Dec 07, 2017 2:37 pm

another issue was found: Reader does not offer an action (the icon is pale and does not respond to a click) if the page was open in the background (middle mouse click) If you refresh the page, then immediately the Reader View is ready. This happens with any site :(
(sorry for my bad english)
Last edited by jars_ on Thu Dec 07, 2017 2:51 pm, edited 1 time in total.

f-117
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: Sat Feb 04, 2017 8:41 pm

Re: Reader View for Pale Moon

Postby f-117 » Thu Dec 07, 2017 2:43 pm

LimboSlam wrote:Actually, I enjoyed Firefox reader view in the url bar. Is it possible to make that option available?

Thanks for this cool add-on, and keep up the good work! :) :thumbup:


I agree.

It just takes up less room on the navigation bar (On my PM) by having it on the URL bar, just like it is in FF.

I am trying it now and it works great!

Scott

User avatar
gracious1
Astronaut
Astronaut
Posts: 653
Joined: Sun May 15, 2016 5:00 am
Location: snowy upstate NY
Contact:

Re: Reader View for Pale Moon

Postby gracious1 » Thu Dec 07, 2017 9:19 pm

But having it on the URL Bar is one reason I installed JustOff's Disable Hello, Pocket & Reader+ extension in Fx. Please keep the button moveable.
ImageBe not the first by whom the new are tried, nor yet the last to lay the old aside.

riiis
Lunatic
Lunatic
Posts: 329
Joined: Sat May 17, 2014 3:51 pm
Location: USA

Re: Reader View for Pale Moon

Postby riiis » Thu Dec 07, 2017 9:47 pm

"Reader View for Pale Moon" is awesome. However, I do have a few suggestions.

AFAIK the reader feature currently does not exist in Pale Moon. Nevertheless, reader-related preferences and reader-related localization strings do exist in Pale Moon. Yet, the Reader View extension does not use these Pale Moon preferences or localization.

Following are the preferences from "about:config" relating to the Reader View extension:
extensions.reader.jpg

Following are the browser native preferences from "about:config" relating to reader:
reader.jpg

The names of the Reader View add-on preferences should be changed to the names already in use by the browser. AFAIK, the browser's reader preferences are not currently used. But, if that situation should change, the existence of these conflicting preferences may cause user confusion or display errors. Accordingly, these preferences should be renamed or deleted in "readerview.js", and renamed, deleted, or hard-coded in the files in which these preferences are used.

The "readerMain.xul" file currently defines the shortcut key "Ctrl+Alt+R".

Line 27 of "readerMain.xul" should be changed from:
key="&readerview.toggleReaderMode.key;"

Changed to:
key="V"


The "readerview.dtd" locale file is not needed and should be deleted. The line 4 reference to this DTD file in "readerMain.xul" should also be deleted.

This change in "readerMain.xul" changes the Reader View shortcut from "Ctrl+Alt+R" to "Ctrl+Alt+V". If this change in shortcut is not acceptable, change Line 27 of "readerMain.xul" to key="R" (instead of key="V").

"Ctrl+Alt+V" appears to be in use only by the "Evernote" and "Microsoft Excel" programs. Thus, unlike "Ctrl+Alt+R", this shortcut is unlikely to cause conflicts within Pale Moon.

Reader View has only one locale (en-US). Available locales should be and can be easily expanded to 30 or 50 or more locales.

The "aboutReader.properties" file is already localized in Pale Moon ("chrome://global/locale/aboutReader.properties"). However, the Reader View extension appears to be using a different "aboutReader.properties" file, obtained from a recent version of Firefox, for its one locale. This Firefox locale file contains a few strings, not included in the Pale Moon "aboutReader.properties" file. Accordingly, the Pale Moon "aboutReader.properties" files can not be used to expand localization. Instead, to do so, additional Firefox Language Packs must be downloaded from Mozilla. Fortunately, these files are readily available.

Firefox Language Packs (any version) are available from the Firefox FTP site. Two versions are shown below. Replace "55.0" or "24.0" to obtain a different version. Right-click the Firefox Language Packs you wish to download, then select "Save Link As ..." to begin the download. For convenience, download these Language Packs to a separate folder. Use "Bandizip" to extract all Language Packs together at one time, to separate folders, with just two clicks. Then, copy each Firefox file from "chrome://global/locale/aboutReader.properties" to the appropriate locale folder in Reader View.

http://releases.mozilla.org/pub/mozilla ... win32/xpi/
http://releases.mozilla.org/pub/mozilla ... win32/xpi/

User avatar
back2themoon
Astronaut
Astronaut
Posts: 919
Joined: Sun Aug 19, 2012 8:32 pm

Re: Reader View for Pale Moon

Postby back2themoon » Thu Dec 07, 2017 11:32 pm

Thank you Isengrim! :thumbup:
Safe Mode / clean profile info: Menu/Help/Restart with Add-ons Disabled
Information to include when asking for support - How to apply user agent overrides

Windows 10 Pro - Pale Moon x64 - FossaMail x64 - Emsisoft Anti-Malware

User avatar
LimboSlam
Board Warrior
Board Warrior
Posts: 1001
Joined: Mon Jun 09, 2014 4:43 am
Location: USA

Re: Reader View for Pale Moon

Postby LimboSlam » Fri Dec 08, 2017 3:22 am

gracious1 wrote:Please keep the button moveable.


Of course, it should stay moveable. Although, an option to move Reader View into the url bar could also be a choice, if it is feasible? :think:


EDIT: Yes, it seems that it will be possible to add Reader View into the url bar. See here: https://github.com/Ascrod/readerview/issues/16.
With Pale Moon by my side, surfing the web is quite enjoyable and takes my headaches away! :)
God is not punishing you, He is preparing you. Trust His plan, not your pain.#‎TrentShelton #‎RehabTime

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Re: Reader View for Pale Moon

Postby Isengrim » Fri Dec 08, 2017 5:00 am

If I include an option to put the button in the URL bar, it will be just that - an option. :) I added an issue for it on the repo, but it's more as a reminder for myself to look into it. I haven't delved into whether it is actually possible just yet.

Riiis: I'll try to respond to your post one item at a time.

riiis wrote:AFAIK the reader feature currently does not exist in Pale Moon. Nevertheless, reader-related preferences and reader-related localization strings do exist in Pale Moon. Yet, the Reader View extension does not use these Pale Moon preferences or localization.

I made my own set of resources to intentionally avoid stepping on anything done by the browser, and because much of what's left of the Reader code is pretty outdated. I've been meaning to ask the dev team about what they're going to do with it, but my assumption is that it's targeted for removal as part of code cleanup. Additionally, in regards to naming preferences, I understand that it is good practice for extensions to prefix any custom prefs with "extensions", so that is what I did.

riiis wrote:The "readerview.dtd" locale file is not needed and should be deleted. The line 4 reference to this DTD file in "readerMain.xul" should also be deleted.

Initially, I had assumed that Mozilla defined the key in a DTD file for localization reasons, so I left it there in my project as well. Upon further research, there's a nice big note at the top of browser.dtd that I miraculously seemed to have missed:

Code: Select all

<!-- LOCALIZATION NOTE : FILE Do not translate commandkeys -->

So I'll remove that and hardcode the R in the xul.

riiis wrote:"Ctrl+Alt+V" appears to be in use only by the "Evernote" and "Microsoft Excel" programs. Thus, unlike "Ctrl+Alt+R", this shortcut is unlikely to cause conflicts within Pale Moon.

As discussed above, Ctrl+Alt+R is used here to maintain parity with Firefox/Basilisk. Also as discussed above, Pale Moon no longer uses Ctrl+Alt+R. I am considering adding a "disable_shortcut_key" pref as a workaround for users who might find this key problematic. As to changing the key combo, there was a lot of discussion on Mozilla's end about what to use, and I'd rather stick with what is there now rather than open that debate back up unless Pale Moon reimplements the "Ctrl+Alt+R" shortcut. At best, I will probably make it a configurable option if I can.

riiis wrote:Reader View has only one locale (en-US). Available locales should be and can be easily expanded to 30 or 50 or more locales.

Doing a little more research, it might be easier on me to clone l10n-central from mozilla and cobble together a script that will update the locales in my add-on from that. I need to do the same for Readability.js anyway.

Thank you for the tips!

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Re: Reader View for Pale Moon

Postby Isengrim » Fri Dec 08, 2017 5:02 am

Reader View 1.0.1 is now up. The Pale Moon addons page and the github repository have both been updated. Please see the release notes for details.

Thank you all for your support, and happy reading!

User avatar
gracious1
Astronaut
Astronaut
Posts: 653
Joined: Sun May 15, 2016 5:00 am
Location: snowy upstate NY
Contact:

Re: Reader View for Pale Moon

Postby gracious1 » Fri Dec 08, 2017 5:27 am

Isengrim wrote:Reader View 1.0.1 is now up. The Pale Moon addons page and the github repository have both been updated. Please see the release notes for details.

Thank you all for your support, and happy reading!


I appreciate the efforts you made, but I got a serious problem when I installed Reader View 1.0.1 in PM 27.7.0a2 (64-bit) (2017-11-23) on Ubuntu 14.04 .

I had a Custom Toolbar, and it completely deleted it. All the buttons that were on it are back in the Customize dialog box. :( :thumbdown: :cry: It also caused Persona Switcher to change to a different persona, though this is minor in comparison to losing an entire toolbar.

So, just to be safe, I am removing it, and using Clean Uninstall to erase preferences, and then I will install the previous version until this can be fixed.

P.S. I also want to add that I find the button very hard to see. Is there anyway to make more visible?
ImageBe not the first by whom the new are tried, nor yet the last to lay the old aside.

User avatar
Isengrim
Moonbather
Moonbather
Posts: 62
Joined: Tue Sep 08, 2015 10:54 pm
Location: 127.0.0.1

Re: Reader View for Pale Moon

Postby Isengrim » Fri Dec 08, 2017 6:18 am

gracious1 wrote:I appreciate the efforts you made, but I got a serious problem when I installed Reader View 1.0.1 in PM 27.7.0a2 (64-bit) (2017-11-23) on Ubuntu 14.04 .

I had a Custom Toolbar, and it completely deleted it. All the buttons that were on it are back in the Customize dialog box. :( :thumbdown: :cry: It also caused Persona Switcher to change to a different persona, though this is minor in comparison to losing an entire toolbar.

So, just to be safe, I am removing it, and using Clean Uninstall to erase preferences, and then I will install the previous version until this can be fixed.

P.S. I also want to add that I find the button very hard to see.

I am terribly sorry about that! I will take another look at the code that adds the button on first run. Since it only runs once after you install it (and doesn't run again until you uninstall and reinstall, due to permanently setting the first_run pref), it would not have happened again.

Still, this needs to be fixed. I'll do what I can to get this resolved as quickly as possible. Thanks for letting me know.

SpockMan02
Apollo supporter
Apollo supporter
Posts: 44
Joined: Sun Sep 24, 2017 4:35 pm

Re: Reader View for Pale Moon

Postby SpockMan02 » Fri Dec 08, 2017 6:25 am

gracious1 wrote:I got a serious problem when I installed Reader View 1.0.1 in PM 27.7.0a2 (64-bit) (2017-11-23) on Ubuntu 14.04 .

I had a Custom Toolbar, and it completely deleted it. All the buttons that were on it are back in the Customize dialog box. :( :thumbdown: :cry: It also caused Persona Switcher to change to a different persona, though this is minor in comparison to losing an entire toolbar.

So, just to be safe, I am removing it, and using Clean Uninstall to erase preferences, and then I will install the previous version until this can be fixed.

P.S. I also want to add that I find the button very hard to see. Is there anyway to make more visible?


Huh, I just installed this add-on to try it out, and all but one of the add-on buttons in my navigation toolbar disappeared (plus two buttons that are there by default and I had removed are back). I guess this is why. It's not a big problem for me, since it wasn't a custom toolbar and nothing's deleted. But, yeah, hopefully Isengrim can fix this.


Return to “Browser extensions”

Who is online

Users browsing this forum: dlangton and 4 guests