Skip to content
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

Open
wants to merge 8 commits into
base: next
Choose a base branch
from
5 changes: 4 additions & 1 deletion stregsystem/static/stregsystem/gdpr.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ if (username_element.length > 0) {
var date = new Date();
// Only do username replacements on Fridays
if (date.getDay() === 5) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Falke

const easter_egg_names = ["user", "admin", "root", "alan_turing", "hackerman", "foo", "bar"];
const easter_egg_names = ["user", "admin", "root", "alan_turing", "dijkstra", "knuth", "hackerman", "foo",
"bar", "Robert\'); DROP TABLE fembers;--", "hunter2", "correcthorsebatterystaple",
krestenlaust marked this conversation as resolved.
Show resolved Hide resolved
String.fromCodePoint(0x1F4BE), String.fromCodePoint(0x1F37A),
String.fromCodePoint(0x1F937)];
replaced_username = easter_egg_names[Math.floor(Math.random() * easter_egg_names.length)];
}
for (var i = 0; i < username_element.length; i++) {
Expand Down