Skip to content

Commit

Permalink
fix: timezone!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-fish committed Mar 31, 2024
1 parent 1656c07 commit 1d77812
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ mw.hook('InPageEdit').add(({ _analytics, _msg, InPageEdit }) => {

// April Fools' Day
;(() => {
const ymd = new Date().toISOString().slice(0, 10)
if (ymd === '2024-04-01') {
const from = new Date('2024-04-01T00:00:00+08:00').getTime()
const to = new Date('2024-04-08T00:00:00+08:00').getTime()
const now = Date.now()
if (now >= from && now < to) {
mw.loader.load(
'https://plugins.ipe.wiki/plugins/april-fool-2024/style.css',
'text/css'
Expand Down

0 comments on commit 1d77812

Please sign in to comment.