redirect to Al-Kahf if today's Friday
This commit is contained in:
parent
5e2ab86e22
commit
eb724a14b4
1 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,11 @@
|
|||
import { getLocale } from 'lib/locales';
|
||||
import { getLocale } from "lib/locales";
|
||||
|
||||
(function () {
|
||||
const surahId: number = Math.ceil(Math.random() * 114);
|
||||
let surahId: number = Math.ceil(Math.random() * 114);
|
||||
const locale: string = getLocale();
|
||||
|
||||
const day = new Date().getDay();
|
||||
if (day === 5) surahId = 18;
|
||||
|
||||
location.replace(`/${locale}/${surahId}`);
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue