Created
February 17, 2011 14:57
-
-
Save pdokas/831862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Emphasis: https://github.com/NYTimes/Emphasis | |
announcement: http://open.blogs.nytimes.com/2011/01/11/emphasis-update-and-source/ | |
source: https://github.com/NYTimes/Emphasis/blob/master/js/emphasis-src.js | |
location on nytimes.com: http://graphics8.nytimes.com/js/app/common/emphasis/app.js | |
Cortex: http://cortexapp.com/ | |
-- | |
The problem | |
------------- | |
When Cortex is enabled in Chrome, you can't press shift twice to enable Emphasis. | |
The problem in source | |
----------------------- | |
Emphasis Line 56 errors and execution stops (see https://github.com/NYTimes/Emphasis/blob/master/js/emphasis-src.js#L56). | |
Manually running this line in the console produces this error: | |
> $$(".entry p:not(p[class]):not(:empty)", ".post p:not(p[class]):not(:empty)", "article p:not(p[class]):not(:empty)"); | |
TypeError: Cannot call method 'match' of undefined | |
I've reduced this to this minimal test case: | |
> $$("*:empty") | |
TypeError: Cannot call method 'match' of undefined | |
When Cortex is disabled, Prototype returns full Element lists without error and Emphasis runs correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment