diff --git a/themes/hexo-theme-xups/source/js/tips.js b/themes/hexo-theme-xups/source/js/tips.js
index 7b276a6..d45919b 100644
--- a/themes/hexo-theme-xups/source/js/tips.js
+++ b/themes/hexo-theme-xups/source/js/tips.js
@@ -5,15 +5,15 @@ function render(template, context) {
var tokenReg = /(\\)?\{([^\{\}\\]+)(\\)?\}/g;
return template.replace(tokenReg, function (word, slash1, token, slash2) {
if (slash1 || slash2) {
- return word.replace('\\', '');
+ return word.replace('\\', '');
}
var variables = token.replace(/\s/g, '').split('.');
var currentObject = context;
var i, length, variable;
for (i = 0, length = variables.length; i < length; ++i) {
- variable = variables[i];
- currentObject = currentObject[variable];
- if (!currentObject) return '';
+ variable = variables[i];
+ currentObject = currentObject[variable];
+ if (!currentObject) return '';
}
return currentObject;
});
@@ -63,42 +63,42 @@ $.ajax({
var text;
if(document.referrer !== ''){
- var referrer = document.createElement('a');
- referrer.href = document.referrer;
- text = 'Hello! 来自 ' + referrer.hostname + ' 的朋友';
- var domain = referrer.hostname.split('.')[1];
- if (domain == 'baidu') {
- text = 'Hello! 来自 百度搜索 的朋友
你是搜索 ' + referrer.search.split('&wd=')[1].split('&')[0] + ' 找到的我吗?';
- }else if (domain == 'so') {
- text = 'Hello! 来自 360搜索 的朋友
你是搜索 ' + referrer.search.split('&q=')[1].split('&')[0] + ' 找到的我吗?';
- }else if (domain == 'google') {
- text = 'Hello! 来自 谷歌搜索 的朋友
欢迎阅读『' + document.title.split(' - ')[0] + '』';
- }
+ var referrer = document.createElement('a');
+ referrer.href = document.referrer;
+ text = 'Hello! 来自 ' + referrer.hostname + ' 的朋友';
+ var domain = referrer.hostname.split('.')[1];
+ if (domain == 'baidu') {
+ text = 'Hello! 来自 百度搜索 的朋友
你是搜索 ' + referrer.search.split('&wd=')[1].split('&')[0] + ' 找到的我吗?';
+ }else if (domain == 'so') {
+ text = 'Hello! 来自 360搜索 的朋友
你是搜索 ' + referrer.search.split('&q=')[1].split('&')[0] + ' 找到的我吗?';
+ }else if (domain == 'google') {
+ text = 'Hello! 来自 谷歌搜索 的朋友
欢迎阅读『' + document.title.split(' - ')[0] + '』';
+ }
}else {
- if (window.location.href == 'https://www.colorfulsweet.site/') { //如果是主页
- 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 = '欢迎阅读『' + document.title.split('|')[0] + '』';
+ if (window.location.href == 'https://www.colorfulsweet.site/') { //如果是主页
+ 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 = '欢迎阅读『' + document.title.split('|')[0] + '』';
+ }
}
showMessage(text, 6000);
@@ -106,7 +106,7 @@ window.setInterval(function(){
if(randomTip.length !== 0) {
showMessage(randomTip, 5000);
}
-},5000);
+},20000);
function showMessage(text, timeout){
timeout = timeout || 5000;
diff --git a/themes/hexo-theme-xups/source/resource/model.json b/themes/hexo-theme-xups/source/resource/model.json
index c1aacbd..3ec6db2 100644
--- a/themes/hexo-theme-xups/source/resource/model.json
+++ b/themes/hexo-theme-xups/source/resource/model.json
@@ -2,6 +2,7 @@
"version":"1.0.0",
"model":"model/model.moc",
"textures":[
+ "model/Nightsky_Costume.png",
"model/Sailor_Costume_Black.png"
],
"layout":{