begriffs / css-ratiocinator

because your CSS is garbage
MIT License
1.04k stars 49 forks source link

Bookmarklet crashes #37

Closed davemerrill closed 11 years ago

davemerrill commented 11 years ago

On every page I've tried, local ones and www.google.com, the bookmarklet crashes for me, with this error: Uncaught TypeError: Object [object global] has no method 'simplerStyle' bookmarklet.js:14 (anonymous function) bookmarklet.js:14 p.event.dispatch jquery.min.js:2 g.handle.h

I created the bookmarklet by dragging the js from the scrolling area in the README onto by bookmarks bar in chrome 25, and ran it by clicking the bookmark that created.

This is a great tool, and the ability to run it on local code that can't be accessed from outside (most of my dev works in progress), without installing PhantomJS would be great.

begriffs commented 11 years ago

Try again and see if it works. The bookmarklet has limitations (like it can't simulate a true mouse event so it can't detect :hover states). It will become deprecated as the phantomjs method improves.

davemerrill commented 11 years ago

Runs fine now, quick work!. Is theere any way to see the generated css from there?

OTOH, nevermind. It's not the real thing and won't exist going forward, no point in thinking about it.

Guess it's Phantom time if people want to use this on unpublished projects. Very cool tool.

begriffs commented 11 years ago

Later on it will be deprecated, but for now the bookmarklet is OK.

To see the generated style, inspect the second iframe in chrome and look at the style in the head of the document.

ratiocinated