Live data from Hacker News

Ask HN: My eyesight is not good enough to read HN. What can I do?

news.ycombinator.com

41–50 of 55 posts

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#41
post #9

Please take a look at Bookmarklets Context Menu, a WebExtension that allows to execute bookmarklets as privileged scripts: https://github.com/mems/bookmarklets-context-menu https://addons.mozilla.org/es/firefox/addon/bookmarklets-con... Not sure if it'll work in the mobile version of Firefox though, works great in desktop.

Taking it one step further, you can install an add-on like Tampermoney and run full user scripts (works on mobile as well) https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#42
post #29

>> As a programmer I know how bad the app security models are. Don't understand this. What does this mean? And then do you not use any apps at all?

No, I don't use apps. Apps can do millions of things you don't want an untrusted party to do on your device.

Browsers are apps too and your statement is too vague.

Please explain what you’re afraid of.

To me, it sounds like you’re talking about third party apps, and your fear is about third party developers having access to your web accounts. In that case, that makes a bit more sense but then I hope you’re not using any browser extensions as well.

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#43
post #33

If you are using the Opera browser on Android, then when you zoom, the text resizes but then reflows to fit on the screen. I cannot fathom why the other phone browsers do not have this feature, it makes every site readable without any scrolling left or right.

Came here to say exactly this! Text Reflow works great and imho must have for every mobile browsers.

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#44
I use to make some js for that (Css filters, brightness, contrast etc): Here is a demo on this current page: https://media.giphy.com/media/8lZ5Cyp6rRvrLoXMc1/giphy.gif And the project sources with explanations: https://github.com/webdev23/ponyFilters HN disallow script embedding, but it still can be injected via console, then by using greasmonkey, settings are kept for next displays.

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#45

The existing HN CSP policy allows inline styles. A bookmarklet which just does the following would work: document.querySelectorAll('*').forEach(d => d.style.fontSize='20px') I find it odd that mobile browsers don't allow you to set the font size like desktop browsers do.

Awesome! I was creating a style element and added it to the head. The CSP do not allow that. Now that I know I can alter the elements directly, I will do that instead. Hacker News - I'm back!

Using a style element should have worked too. The HN CSP policy has unsafe-inline which covers both of these things.

Perhaps your problem wasn't with CSP at all, but something else. Maybe a CSS specificity issue?

[edit] - Yeah, I just created this bookmarklet and it worked fine:

javascript:(function(){s=document.createElement('style');s.textContent='*{font-size:20px}';document.head.appendChild(s)})()

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#46
post #24

The existing HN CSP policy allows inline styles. A bookmarklet which just does the following would work: document.querySelectorAll('*').forEach(d => d.style.fontSize='20px') I find it odd that mobile browsers don't allow you to set the font size like desktop browsers do.

Firefox on Android allows scaling according to system font, under Settings > Accessibility. I suppose though that OP is happy with system fonts and not HN fonts.

The font is still quite small on HN even with the system font set to the largest size.

Re: Ask HN: My eyesight is not good enough to read HN. What can I do?

#50

Earlier quoted context omitted.

Awesome! I was creating a style element and added it to the head. The CSP do not allow that. Now that I know I can alter the elements directly, I will do that instead. Hacker News - I'm back!

Using a style element should have worked too. The HN CSP policy has unsafe-inline which covers both of these things. Perhaps your problem wasn't with CSP at all, but something else. Maybe a CSS specificity issue? [edit] - Yeah, I just created this bookmarklet and it worked fine: javascript:(function(){s=document.createElement('style');s.textContent='*{font-size:20px}';document.head.appendChild(s)})()

Even better!

My solution was a link element with a data: URI. Yours is much more elegant. And works!

Thank you very much!

Post reply on HN