Hacker News new | ask | show | jobs
by PowerfulWizard 1893 days ago
I grew up reading the newspaper every day and I prefer quite a narrow margin, here is my bookmarklet for narrowing pages (and it changes font).:

    javascript:!function(){var e,t;e='body {margin: auto;margin-left: 100px;max-width: 540px;font-family: "Helvetica Neue", Helvetica, sans-serif;}',t=document.createElement("style"),t.type="text/css",t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)}();
You could change the "540" to "900" for your needs. I prefer this to narrowing the window because I prefer the whole screen to have a uniform background color.

Edit I don't think it is infaillible, it didn't work on this page, but it works well on pages with no markup. For more complicated site you may try this: https://oxal.org/projects/sakura/bookmark/

1 comments

I didn't think of doing this! I'll edit your snippet to do just the css I need and save it as a bookmark(let). Cheers!