Enabling reader view from Pentadactyl

326 views
Skip to first unread message

markus...@gmail.com

unread,
Jul 5, 2015, 6:30:55 AM7/5/15
to penta...@googlegroups.com
Firefox has now the builtin reader view feature.
I would like to enable this feature by keystroke.
Normally it is only possible to use it with a button inside the address bar.

This press changes the url to:
about:reader?url=

I tried to use javascript, by changing window.location, but I only get a 'Access Denied' because of the protocol change.
Are there any other ways to change the  current page?


Doug Kearns

unread,
Jul 5, 2015, 12:30:56 PM7/5/15
to penta...@googlegroups.com
You want window.content.location.

The reader-mode API, at first blush, seems typically unkind to external consumers so it's probably easiest to just drive it through the UI.

Try something like:

map gr -js let r = document.getElementById('reader-mode-button'); if (!r.hidden) r.click()

You could use :emenu as well as there's an entry under View.

Doug

--

---
You received this message because you are subscribed to the Google Groups "Pentadactyl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pentadactyl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

markus...@gmail.com

unread,
Jul 7, 2015, 6:12:40 AM7/7/15
to penta...@googlegroups.com

You want window.content.location.

The reader-mode API, at first blush, seems typically unkind to external consumers so it's probably easiest to just drive it through the UI.

Try something like:

map gr -js let r = document.getElementById('reader-mode-button'); if (!r.hidden) r.click()

You could use :emenu as well as there's an entry under View.

Thank you!
The map command works great.

The emenu command is awesome, didn't know it existed.

Markus
Reply all
Reply to author
Forward
0 new messages