-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature easter egg username replacements #196
base: next
Are you sure you want to change the base?
Feature easter egg username replacements #196
Conversation
@@ -11,8 +11,8 @@ if (username_element.length > 0) { | |||
var replaced_username = "[username_hidden]"; | |||
var date = new Date(); | |||
// Only do username memes on April Fools | |||
if (date.getDate() === 1 && date.getMonth() + 1 === 4) { | |||
const easter_egg_names = ["user", "admin", "root", "alan_turing", "hackerman", "hans_huttel"]; | |||
if (date.getDate() === 21 && date.getMonth() + 1 === 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my calendar, that is not the first of April :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙃 fixed in b41abee
I suggest doing these replacements on every Friday as it otherwise likely won't ever be seen. |
…names to substitutions
Turns out that Math.random returns a range inclusive of 0 but exclusive of 1. This is fixed in 6c9171d. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6c9171d nice catch 😉
Codecov Report
@@ Coverage Diff @@
## next #196 +/- ##
=======================================
Coverage 53.90% 53.90%
=======================================
Files 33 33
Lines 4508 4508
Branches 265 265
=======================================
Hits 2430 2430
Misses 2028 2028
Partials 50 50 |
var replaced_username = "[brugernavn skjult]"; | ||
var date = new Date(); | ||
// Only do username replacements on Fridays | ||
if (date.getDay() === 5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (date.getDay() === 5) { | |
if (date.getMonth() === 3 && date.getDay() == 1) { |
I think having it every friday will kill the joke, and would create a lot of confusion. Having it on april fools would make people confused but they'd be able to reason with it. Maybe extend the easter egg to the first monday after april fools to make sure it will go in effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having it once a year is too short of a timeframe for it to be noticed, as most fembers doesn't stay around to look at the replaced 'xxxxxxxx'.
The first Friday of every month (for example) gives ~4 days per semester for fembers to notice it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Falke
Very similar to #155 but utilises the username-hider feature #182, so the replaced username is on-screen until the next user approaches. Therefore, more people should be able to see the replaced usernames.
Allowing the feature to trigger at another interval could make it more than a once-a-year occurrence. Each Friday, maybe?
The ordinary replacement 'xxxxxxxx' is replaced with '[username_hidden]' for clarity but mostly personal preference.