mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2026-05-22 15:22:24 +00:00
Update 6 files
- /_layouts/post.html - /_layouts/default.html - /assets/js/main.js - /assets/js/pjax.js - /_data/other_repo_list.csv - /Live2dHistoire/live2d/js/message.js
This commit is contained in:
@@ -129,35 +129,8 @@ if (!norunFlag) {
|
||||
} else {
|
||||
text = '嗨!来自 <span style="color:#0099cc;">' + referrer.hostname + '</span> 的朋友!';
|
||||
}
|
||||
} else if (typeof window._pjaxGetWelcomeText === 'function') {
|
||||
// 复用 pjax.js 中的欢迎语生成函数,避免重复逻辑
|
||||
text = window._pjaxGetWelcomeText();
|
||||
} else {
|
||||
// pjax.js 尚未加载时的兜底(首次访问且 pjax.js 在 message.js 之后加载)
|
||||
if (window.location.pathname == "/") {
|
||||
var now = (new Date()).getHours();
|
||||
if (now > 23 || now <= 5) {
|
||||
text = '你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?';
|
||||
} else if (now > 5 && now <= 7) {
|
||||
text = '早上好!一日之计在于晨,美好的一天就要开始了!';
|
||||
} else if (now > 7 && now <= 11) {
|
||||
text = '上午好!工作顺利嘛,不要久坐,多起来走动走动哦!';
|
||||
} else if (now > 11 && now <= 14) {
|
||||
text = '中午了,工作了一个上午,现在是午餐时间!';
|
||||
} else if (now > 14 && now <= 17) {
|
||||
text = '午后很容易犯困呢,今天的运动目标完成了吗?';
|
||||
} else if (now > 17 && now <= 19) {
|
||||
text = '傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~~';
|
||||
} else if (now > 19 && now <= 21) {
|
||||
text = '晚上好,今天过得怎么样?';
|
||||
} else if (now > 21 && now <= 23) {
|
||||
text = '已经这么晚了呀,早点休息吧,晚安~~';
|
||||
} else {
|
||||
text = '嗨~ 快来逗我玩吧!';
|
||||
}
|
||||
} else {
|
||||
text = '欢迎阅读<span style="color:#0099cc;">「 ' + document.title.split(' | ')[0] + ' 」</span>';
|
||||
}
|
||||
text = getWelcomeText();
|
||||
}
|
||||
showMessage(text, 12000);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user