waldyrious / downstyler

A stylesheet and bookmarklet that trims webpage styles down to near-bare HTML.
http://waldyrious.net/downstyler
ISC License
29 stars 5 forks source link

Make MIME type explicit in bookmarklet code #61

Closed waldyrious closed 3 years ago

waldyrious commented 3 years ago

Add the type="text/css" attribute to the <link rel="stylesheet"> tag in the code of the bookmarklets.

Without this MIME type being explicitly indicated, the browser assumes the resource to be of the default type (text/plain) in websites with the X-Content-Type-Options: nosniff header, resulting in blocking of the resource, and the following error in the console:

The resource from "https//raw.githack.com/waldyrious/downstyler/master/downstyler.css" was blocked due to MIME type ("text/plain") mismatch (X-Content-Type-Options: nosniff).