4 ms·
I've been considering doing something similar, except with plain CSS: a.paper ~ a.comments { display: none; } a.paper:visited ~ a.comments {
by jhardy54 6y ago
I've been considering doing something similar, except with plain CSS:
a.paper ~ a.comments {
display: none;
}
a.paper:visited ~ a.comments {
display: inline;
}
- zzo38computer 6y agoSome users (including myself) disable the :visited command.
- jldugger 6y agoSometimes we must all make sacrifices for the greater good.
- asveikau 6y agoThinking of reasons one would want to disable that caused me to do a Google search and find this: https://developer.mozilla.org/en-US/docs/Web/CSS/Privacy_and_the_:visited_selector https://developer.mozilla.org/en-US/docs/Web/CSS/Privacy_and... I guess it can't be observed from a script? That would be a neat way to get potentially sensitive info.
- Polylactic_acid 6y agoAs mentioned in the article, firefox also limits what you can actually do with the visited selector so there is no way you can use css to change something which is detectable with js so the comments hidden thing won't work.
- chrismorgan 6y agoThat won’t work. :visited was neutered for privacy reasons a decade or so ago, so that all you can change with it is colours, and if you try to inspect it with JavaScript it will give you the answers it would if :visited didn’t apply (e.g. it’ll tell you that purple link is blue). The closest you’ll be able to get is a JavaScript click handler on .paper revealing .comments. If you do such a thing, you should probably only hide the comments with JavaScript in the first place, so that users with JavaScript disabled can still see them.