1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-24 00:23:10 +00:00

refactor: remove site config option prefer_datetime_locale

This commit is contained in:
Cotes Chung
2022-10-19 03:47:48 +08:00
parent f904e8cd48
commit 6852ceb280
12 changed files with 11 additions and 23 deletions

View File

@@ -6,9 +6,7 @@
/* A tool for locale datetime */
const LocaleHelper = (function () {
const $preferLocale = $('meta[name="prefer-datetime-locale"]');
const locale = $preferLocale.length > 0 ?
$preferLocale.attr('content').toLowerCase() : $('html').attr('lang').substr(0, 2);
const locale = $('html').attr('lang').substr(0, 2)
const attrTimestamp = 'data-ts';
const attrDateFormat = 'data-df';