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.
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.
Now that I know I can alter the elements directly, I will do that instead.
Hacker News - I'm back!
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)})()
My solution was a link element with a data: URI. Yours is much more elegant. And works!
Thank you very much!
style-src 'self' 'unsafe-inline'
This means they can include CSS from the same origin, or inline. It would need "data:" adding to the list to allow data URI's as an accepted source.
I suppose though that OP is happy with system fonts and not HN fonts.