Strip all styles for a given webpage (using client-side JavaScript). Inspired by css-naked-day. Read more in my CSS Naked blog post
Try this for any site on the web. Load a web page with the query param ?css-naked
, open the console in the browser’s DevTools, and run this dynamic import:
import("https://cdn.jsdelivr.net/gh/jimniels/css-naked@0.1.0/css-naked.js");
Use this on your site by importing the module in JS:
import "https://cdn.jsdelivr.net/gh/jimniels/css-naked@0.1.0/css-naked.js";
Or in HTML:
<script
type="module"
src="https://cdn.jsdelivr.net/gh/jimniels/css-naked@0.1.0/css-naked.js"
></script>
Once incorporated, you can toggle the “css-naked mode” by adding the ?css-naked
query param to any page you load. Once triggered, css-naked
persists your choice as you navigate from page to page. To turn it off, click the link in the injected banner.
To test locally: python -m SimpleHTTPServer 8000
and open test.html?css-naked.