r/reddithax • u/Goctionni • Jul 30 '15
Reddit CSS and randomization
Hello,
I was wondering if anyone knew of any html elements or alike that could be used to generate random "events". What I mean is (for example) hiding an element 9 out of 10 visits.
For aprils fools I used the reddit post ID to "randomly" prefix all posts on my subreddit with fairly random strings of text (ie: "[Astronaut]").
Example CSS:
[data-fullname$="p"] p.title > a.title:before {
content: '[Astronaut]';
}Now I'm looking for CSS that will simply appear only one in so many (random) page visits. So far I've not really been able to find any elements that I could hook onto as a randomizer.
2
Upvotes
View all comments
Show parent comment
1
u/Goctionni Jul 30 '15
I kind of intend to have it moving around the page; so not a good option in this case.
Mind you; this will only be a temporary thing for an event :)