You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serving the css file using the 'raw' option serves the file with a mime-type of text/plain. This makes the css file fail to work in Firefox and other browsers. By making use of Github pages, the CSS file can be served with the correct mime-type, making the bookmarklet work in more browsers.
By simply making a gh-pages branch, Github pages will automatically be set up for you, with no more effort needed:
Then, evil.css can be found at http://tlrobinson.github.com/evil.css/evil.css with the correct mine-type. Just keep master and gh-pages in sync, and Github will do the rest.
You can additionally make an index.html file to act as a landing page, where you can add the bookmarklet as an anchor for people to bookmark, but this step is completely optional.
The text was updated successfully, but these errors were encountered:
I can confirm that the demo bookmarklet code no longer works. There is an explanation of browser behaviour when a stylesheet link element points to a file whose type is not text/css in the section of the W3 HTML5 semantics working draft about the link element:
[The browser] would then check the actual types returned by the server. For those that are sent as text/css, it would apply the styles, but for those labeled as text/plain, or any other type, it would not.
Serving the css file using the 'raw' option serves the file with a mime-type of
text/plain
. This makes the css file fail to work in Firefox and other browsers. By making use of Github pages, the CSS file can be served with the correct mime-type, making the bookmarklet work in more browsers.By simply making a
gh-pages
branch, Github pages will automatically be set up for you, with no more effort needed:Then, evil.css can be found at
http://tlrobinson.github.com/evil.css/evil.css
with the correct mine-type. Just keepmaster
andgh-pages
in sync, and Github will do the rest.You can additionally make an index.html file to act as a landing page, where you can add the bookmarklet as an anchor for people to bookmark, but this step is completely optional.
The text was updated successfully, but these errors were encountered: