Reader View for Pale Moon

General discussion, compatibility and contributed extensions.

Moderators: satrow, FranklinDM, Lootyhoof

User avatar
Isengrim
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Reader View for Pale Moon

Unread postby Isengrim » Tue, 05 Dec 2017, 02:13

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!
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 842
Joined: Sun, 15 May 2016, 05:00
Location: muggy, muggy upstate NY

Re: Reader View for Pale Moon

Unread postby gracious1 » Tue, 05 Dec 2017, 02:29

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!
Image“We look forward to the time when the Power of Love will replace the Love of Power. Then will our world know the blessings of peace.” ― Wm. Ewart Gladstone

jars_
Fanatic
Fanatic
Posts: 174
Joined: Tue, 27 Dec 2016, 00:12

Re: Reader View for Pale Moon

Unread postby jars_ » Tue, 05 Dec 2017, 06:28

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
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Re: Reader View for Pale Moon

Unread postby Isengrim » Wed, 06 Dec 2017, 04:04

Thanks for the feedback! I have added these issues to the repo and fixes will be in the next release.
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 842
Joined: Sun, 15 May 2016, 05:00
Location: muggy, muggy upstate NY

Re: Reader View for Pale Moon

Unread postby gracious1 » Wed, 06 Dec 2017, 04:26

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!
Image“We look forward to the time when the Power of Love will replace the Love of Power. Then will our world know the blessings of peace.” ― Wm. Ewart Gladstone

User avatar
Isengrim
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Re: Reader View for Pale Moon

Unread postby Isengrim » Wed, 06 Dec 2017, 05:47

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.
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 842
Joined: Sun, 15 May 2016, 05:00
Location: muggy, muggy upstate NY

Re: Reader View for Pale Moon

Unread postby gracious1 » Wed, 06 Dec 2017, 07:21

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!
Image“We look forward to the time when the Power of Love will replace the Love of Power. Then will our world know the blessings of peace.” ― Wm. Ewart Gladstone

User avatar
Isengrim
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Re: Reader View for Pale Moon

Unread postby Isengrim » Wed, 06 Dec 2017, 23:16

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.
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
LimboSlam
Board Warrior
Board Warrior
Posts: 1026
Joined: Mon, 09 Jun 2014, 04:43
Location: USA

Re: Reader View for Pale Moon

Unread postby LimboSlam » Thu, 07 Dec 2017, 03:47

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_
Fanatic
Fanatic
Posts: 174
Joined: Tue, 27 Dec 2016, 00:12

Re: Reader View for Pale Moon

Unread postby jars_ » Thu, 07 Dec 2017, 14:37

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, 07 Dec 2017, 14:51, edited 1 time in total.

f-117
Apollo supporter
Apollo supporter
Posts: 42
Joined: Sat, 04 Feb 2017, 20:41

Re: Reader View for Pale Moon

Unread postby f-117 » Thu, 07 Dec 2017, 14:43

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
Keeps coming back
Keeps coming back
Posts: 842
Joined: Sun, 15 May 2016, 05:00
Location: muggy, muggy upstate NY

Re: Reader View for Pale Moon

Unread postby gracious1 » Thu, 07 Dec 2017, 21:19

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.
Image“We look forward to the time when the Power of Love will replace the Love of Power. Then will our world know the blessings of peace.” ― Wm. Ewart Gladstone

riiis
Lunatic
Lunatic
Posts: 431
Joined: Sat, 17 May 2014, 15:51
Location: USA

Re: Reader View for Pale Moon

Unread postby riiis » Thu, 07 Dec 2017, 21:47

"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
Board Warrior
Board Warrior
Posts: 1273
Joined: Sun, 19 Aug 2012, 20:32

Re: Reader View for Pale Moon

Unread postby back2themoon » Thu, 07 Dec 2017, 23:32

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

Windows 10 Pro 1809 • Pale Moon • Interlink • Emsisoft Anti-Malware

User avatar
LimboSlam
Board Warrior
Board Warrior
Posts: 1026
Joined: Mon, 09 Jun 2014, 04:43
Location: USA

Re: Reader View for Pale Moon

Unread postby LimboSlam » Fri, 08 Dec 2017, 03:22

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
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Re: Reader View for Pale Moon

Unread postby Isengrim » Fri, 08 Dec 2017, 05:00

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!
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
Isengrim
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Re: Reader View for Pale Moon

Unread postby Isengrim » Fri, 08 Dec 2017, 05:02

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!
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 842
Joined: Sun, 15 May 2016, 05:00
Location: muggy, muggy upstate NY

Re: Reader View for Pale Moon

Unread postby gracious1 » Fri, 08 Dec 2017, 05:27

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?
Image“We look forward to the time when the Power of Love will replace the Love of Power. Then will our world know the blessings of peace.” ― Wm. Ewart Gladstone

User avatar
Isengrim
Astronaut
Astronaut
Posts: 544
Joined: Tue, 08 Sep 2015, 22:54
Location: 127.0.0.1
Contact:

Re: Reader View for Pale Moon

Unread postby Isengrim » Fri, 08 Dec 2017, 06:18

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.
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 build 1803 (64-bit) (Sometimes)
We are our choices.

User avatar
SpockFan02
Lunatic
Lunatic
Posts: 460
Joined: Sun, 24 Sep 2017, 16:35

Re: Reader View for Pale Moon

Unread postby SpockFan02 » Fri, 08 Dec 2017, 06:25

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: back2themoon, New Tobin Paradigm and 11 guests