LeaVerou / css3patterns

The popular CSS3 patterns gallery, now on Github :)
https://leaverou.github.io/css3patterns/
MIT License
1.44k stars 262 forks source link

Patterns don't show #153

Closed VAggrippino closed 6 years ago

VAggrippino commented 6 years ago

None of the patterns inside of ul#patterns show. They all have display:none set.

I found the offending line in Developer Tools:

body[style] #patterns > li:not(:target) {
    display: none;
}

I'll look for it in the actual code here at GitHub, but I'm sure someone who's actually familiar with the code structure can find it more quickly than me.

Update When I load http://lea.verou.me/css3patterns/ (no target) location.hash still returns some truey value. So, the code that starts at about line 62 of css3patterns.js adds the style property to the body element which is supposed to hide all of the patterns except for the one I've selected. Since there isn't actually a target, the second part of the ternary clause (querySelector) doesn't actually match a valid element and nothing is shown.

This is weird. location.hash should be falsy. I suspect it's just me and I think the problem might go away after I clear my cache and close my browser.

Update Nope. That's wrong. The problem occurs after clearing the cache and restarting the browser. I can duplicate the problem locally after cloning the repository, but I can also confirm that the onhashchange function code doesn't execute on page load .

This doesn't happen on Firefox and it doesn't happen in an incognito window. So, I guess I've confirmed that it's only me. It must be a browser extension.

VAggrippino commented 6 years ago

"Password Revealer": https://chrome.google.com/webstore/detail/password-revealer/gldhelojchodefkemcnpaagnokhjlmia

This extension adds a style property with no value to the body tag. Line 119 of style.css hides any unselected patterns inside of body[style].

I'll try to send a message to the author.

VAggrippino commented 6 years ago

Apparently the problem originates with jQuery 2.0.2 which was bundled with the extension.

Ref: https://stackoverflow.com/q/17132595/2948042