Add margins to wide pages.
Narrower Extension
Narrower is a simple extension for dealing with annoyingly wide websites.
Usage:
To add margins to a wide page, click on the extension icon and drag the slider.
The extension will continue narrowing the current page as long as you stay on the same website.
To return the page to its previous state, drag the margin slider to 0% and refresh the page.
How it works:
When you drag the margin slider, Narrower changes the padding value of `document.documentElement`. It then leaves the selected margin in the website's localStorage, so it can be recalled the next time you activate the extension on the site.
Known issues:
Changing the padding of the document element doesn't work on 100% of the pages. If a page doesn't become narrower as a result of using the extension, you can always resort to manually changing the browser window size.
Read more
Usage:
To add margins to a wide page, click on the extension icon and drag the slider.
The extension will continue narrowing the current page as long as you stay on the same website.
To return the page to its previous state, drag the margin slider to 0% and refresh the page.
How it works:
When you drag the margin slider, Narrower changes the padding value of `document.documentElement`. It then leaves the selected margin in the website's localStorage, so it can be recalled the next time you activate the extension on the site.
Known issues:
Changing the padding of the document element doesn't work on 100% of the pages. If a page doesn't become narrower as a result of using the extension, you can always resort to manually changing the browser window size.
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "Narrower", "description": "Add margins to wide pages.", "version": "1.1", "author": "Andrey Leshenko", "icons": { "16": "images/icon16.png", "32": "images/icon32.png", "48": "images/icon48.png", "128": "images/icon128.png" }, "action": { "default_icon": { "16": "images/icon16.png", "24": "images/icon24.png", "32": "images/icon32.png", "19": "images/popup_icon19.png", "38": "images/popup_icon38.png" }, "default_popup": "popup.html" }, "background": { "service_worker": "service_worker.js", "type": "module" }, "permissions": [ "activeTab", "scripting", "storage" ]}
Read more