From 4e6d2af970230718b47df08ab25fc0f144963a5a Mon Sep 17 00:00:00 2001 From: Marcus Date: Tue, 25 Jul 2023 15:21:07 -0700 Subject: [PATCH 1/2] implement x logo joke --- Extensions/xkit_preferences.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Extensions/xkit_preferences.js b/Extensions/xkit_preferences.js index 4a86fa650..a931206bb 100644 --- a/Extensions/xkit_preferences.js +++ b/Extensions/xkit_preferences.js @@ -14,7 +14,8 @@ XKit.extensions.xkit_preferences = new Object({ button_svgs: { normal: "", halloween: "", - christmas: "" + christmas: "", + x: "𝕏" }, hide_xcloud_if_not_installed: false, @@ -31,10 +32,16 @@ XKit.extensions.xkit_preferences = new Object({ const date = (new Date()).getDate(); const month = (new Date()).getMonth() + 1; + const twitter_x_timestamp = '2023-07-23T20:33:36.000Z'; // https://twitter.com/lindayacc/status/1683213798386147329 + const ms_since_twitter_x = (new Date()).getTime() - (new Date(twitter_x_timestamp)).getTime(); + const one_day = 7 * 24 * 60 * 60 * 1000; + if (date === 31 && month === 10) { holiday = "halloween"; } else if (date >= 24 && date <= 26 && month === 12) { holiday = "christmas"; + } else if (ms_since_twitter_x < one_day * 7) { + holiday = "x"; } var m_html = From 530c1f884468cfeb2c1506f4700b68862fe9ec45 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sun, 30 Jul 2023 05:58:10 -0700 Subject: [PATCH 2/2] make x holiday one day --- Extensions/xkit_preferences.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Extensions/xkit_preferences.js b/Extensions/xkit_preferences.js index a931206bb..f2565d6d4 100644 --- a/Extensions/xkit_preferences.js +++ b/Extensions/xkit_preferences.js @@ -32,15 +32,11 @@ XKit.extensions.xkit_preferences = new Object({ const date = (new Date()).getDate(); const month = (new Date()).getMonth() + 1; - const twitter_x_timestamp = '2023-07-23T20:33:36.000Z'; // https://twitter.com/lindayacc/status/1683213798386147329 - const ms_since_twitter_x = (new Date()).getTime() - (new Date(twitter_x_timestamp)).getTime(); - const one_day = 7 * 24 * 60 * 60 * 1000; - if (date === 31 && month === 10) { holiday = "halloween"; } else if (date >= 24 && date <= 26 && month === 12) { holiday = "christmas"; - } else if (ms_since_twitter_x < one_day * 7) { + } else if (date === 23 && month === 7) { holiday = "x"; }