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

Allow user scripts for the new Firefox Reader facility about:reader #2195

Closed
cipriancraciun opened this issue Jun 6, 2015 · 9 comments
Closed
Milestone

Comments

@cipriancraciun
Copy link

With the latest edition of Firefox, they have integrated the Pocket "reader", which when activated will load a "reading" version of the original page at an URL like about:reader?....

However user scripts are not allowed for about pages, including the about:reader.

I've made a small hack in modules/util/isGreasemonkeyable.js, by adding a line like the one below just after if (/^about:blank/.test(url)) return true;:

if (/^about:reader(\?.*)?$/.test(url)) return true;
@arantius
Copy link
Collaborator

arantius commented Jun 6, 2015

I'll bet dollars to donuts that like other about: pages, it has chrome privileges, so it will never be greaseable.

@cipriancraciun
Copy link
Author

I didn't say (although I wanted to) in my initial comment that I have zero knowledge about what my update implied. Perhaps it just opened a large security whole in my browser, but since I use only user scripts written by me, I am less concerned with potential security issues from my own scripts.

But, indeed a more knowledgeable person, in the inner workings of both Firefox and Grease Monkey, should look into this.

@arantius
Copy link
Collaborator

arantius commented Jun 6, 2015

What exactly are the steps to launch such an about:reader page? I couldn't figure it out in the ~2 minutes I spent trying.

@cipriancraciun
Copy link
Author

For example open the following link, and in the address bar, at the right, just before the reload button there is a small button like a book. Just press it.

http://getpocket.com/blog/2015/06/pocket-is-now-built-into-firefox/

(I guess you need the latest Firefox 38.0, and this feature works only on some pages like the one above.)

@arantius
Copy link
Collaborator

arantius commented Jun 6, 2015

Oh, no about: shows in the UI in that case. But I'm clear what you're talking about and I can check what that context is.

@arantius arantius added this to the 3.4 milestone Jun 6, 2015
@cipriancraciun
Copy link
Author

Indeed the address bar still shows the original URL, but if you run inside the console document.URL, something like about:reader?... appears.

(I applied the patch described in the first comment and it works.)

@janekptacijarabaci
Copy link
Contributor

e.g.
about:reader?url=http%3A%2F%2Fgetpocket.com%2Fblog%2F2015%2F06%2Fpocket-is-now-built-into-firefox%2F
about:reader?url=https%3A%2F%2Fsupport.mozilla.org%2Fcs%2Fquestions%2F1063000

@arantius arantius modified the milestones: 3.4, 3.5 Jul 24, 2015
@arantius
Copy link
Collaborator

This should be in 3.5beta1; let me know what you think:
https://addons.mozilla.org/firefox/downloads/file/354560/greasemonkey-3.5beta1-fx.xpi?src=devhub

@cipriancraciun
Copy link
Author

Perfect. Works like a charm for reader URL's.

Thanks.

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

3 participants