Skip to content

Unstylish

I read a lot of blogs. Blogs that have rich and meaningful content. They tell stories and provide nuanced perspective into many aspects of life. They are often written by people who are not writers, but still have something important to share.

Unfortunately, they are often designed by the same people.

People who are also not designers. People who have no business authoring CSS with their yellow text on a black background.

Because of this, I have found that the reading experience on many sites can be improved with the following jQuery:

$("style,link").remove();
$("[style]").removeAttr("style");

Run it in the console, and it'll strip all the unwanted craziness from the page, reverting back to the browser's sane and clean defaults.

If you're using a modern browser, a jQuery-free version isn't all that complicated either:

(function ($, each) {
  each.call($("[style]"), function (el) {
    el.removeAttribute("style");
  });
  each.call($("link,style"), function (el) {
    el.parentNode.removeChild(el);
  });
})(document.querySelectorAll.bind(document), [].forEach);

Unstylish bookmarklet