sinzmise-cetastories 2.0.0-1731064238567 → 2.0.0-1731114112124
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +4033 -1
- package/about/index.html +4041 -1
- package/album/index.html +4050 -1
- package/archives/2021/12/index.html +3917 -1
- package/archives/2021/index.html +3917 -1
- package/archives/2022/12/index.html +3917 -1
- package/archives/2022/index.html +3917 -1
- package/archives/2023/01/index.html +4072 -1
- package/archives/2023/02/index.html +3917 -1
- package/archives/2023/03/index.html +4063 -1
- package/archives/2023/04/index.html +3992 -1
- package/archives/2023/07/index.html +4217 -1
- package/archives/2023/08/index.html +4067 -1
- package/archives/2023/09/index.html +3917 -1
- package/archives/2023/10/index.html +3917 -1
- package/archives/2023/11/index.html +3917 -1
- package/archives/2023/12/index.html +3918 -1
- package/archives/2023/index.html +4591 -1
- package/archives/2023/page/2/index.html +4572 -1
- package/archives/2023/page/3/index.html +3930 -1
- package/archives/2024/01/index.html +4142 -1
- package/archives/2024/02/index.html +3922 -1
- package/archives/2024/03/index.html +3916 -1
- package/archives/2024/04/index.html +3997 -1
- package/archives/2024/05/index.html +4065 -1
- package/archives/2024/06/index.html +3917 -1
- package/archives/2024/07/index.html +3917 -1
- package/archives/2024/08/index.html +3992 -1
- package/archives/2024/09/index.html +3917 -1
- package/archives/2024/10/index.html +3984 -1
- package/archives/2024/index.html +4576 -1
- package/archives/2024/page/2/index.html +4433 -1
- package/archives/index.html +4560 -1
- package/archives/page/2/index.html +4560 -1
- package/archives/page/3/index.html +4560 -1
- package/archives/page/4/index.html +4560 -1
- package/archives/page/5/index.html +4560 -1
- package/assets/algolia/algoliasearch.js +7182 -3
- package/assets/algolia/algoliasearchLite.js +4445 -3
- package/atom.xml +31 -31
- package/bbs/bbs.html +4012 -1
- package/bbs/bbs.js +12 -2
- package/bbs/index.html +4031 -1
- package/categories/index.html +4050 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +4570 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +4485 -1
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +3920 -1
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +4148 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +4610 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +4148 -1
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +4072 -1
- package/charts/index.html +4039 -1
- package/comments/index.html +4052 -1
- package/content.json +1 -0
- package/css/custom2.css +3 -2
- package/css/first.css +1868 -2
- package/css/pace/big-counter.css +39 -2
- package/css/pace/corner-indicator.css +72 -2
- package/css/pace/flash.css +76 -2
- package/css/pace/mac-osx.css +86 -2
- package/css/pace/pace.css +50 -2
- package/css/plane.css +59 -2
- package/css/style.css +8585 -2
- package/css/tags.css +3516 -2
- package/essay/index.html +4050 -1
- package/fcircle/index.html +4075 -1
- package/games +61 -19
- package/index.html +4717 -1
- package/js/app.js +1341 -2
- package/js/autoload.js +62 -2
- package/js/ceta/fancybox.css +2 -2
- package/js/ceta/fancybox.umd.js +2 -2
- package/js/ceta/iconfontInkss.js +1 -2
- package/js/ceta/message.css +6 -2
- package/js/ceta/message.js +6 -2
- package/js/clock.js +1 -2
- package/js/kslink.js +38 -2
- package/js/newyear.js +76 -2
- package/js/plane.js +2200 -2
- package/js/plugins/aplayer.js +186 -2
- package/js/plugins/parallax.js +191 -2
- package/js/plugins/rightMenus.js +623 -2
- package/js/plugins/tags/contributors.js +92 -2
- package/js/plugins/tags/friends.js +93 -2
- package/js/plugins/tags/sites.js +96 -2
- package/js/search/algolia.js +239 -2
- package/js/search/hexo.js +195 -2
- package/js/search/meilisearch.js +220 -2
- package/js/txmap.js +248 -2
- package/link/index.html +6180 -1
- package/load.html +294 -1
- package/music/index.html +4033 -1
- package/package.json +1 -1
- package/page/2/index.html +4578 -1
- package/page/3/index.html +4575 -1
- package/page/4/index.html +4572 -1
- package/page/5/index.html +3924 -1
- package/posts/10021/index.html +4130 -5
- package/posts/10045/index.html +4224 -1
- package/posts/10733/index.html +4125 -1
- package/posts/10996/index.html +4127 -5
- package/posts/12779/index.html +4134 -1
- package/posts/13624/index.html +4179 -1
- package/posts/15688/index.html +4133 -1
- package/posts/15748/index.html +4121 -5
- package/posts/15799/index.html +4130 -1
- package/posts/15842/index.html +4121 -5
- package/posts/16107/index.html +4111 -1
- package/posts/18063/index.html +4124 -1
- package/posts/20412/index.html +4134 -1
- package/posts/21375/index.html +4124 -1
- package/posts/22945/index.html +4169 -4
- package/posts/23021/index.html +4104 -1
- package/posts/27531/index.html +4121 -5
- package/posts/28536/index.html +4116 -1
- package/posts/28733/index.html +4168 -1
- package/posts/29196/index.html +4106 -1
- package/posts/38917/index.html +4144 -1
- package/posts/38964/index.html +4208 -1
- package/posts/42487/index.html +4135 -1
- package/posts/42580/index.html +4128 -1
- package/posts/45875/index.html +4118 -1
- package/posts/46640/index.html +4147 -1
- package/posts/48762/index.html +4109 -1
- package/posts/50710/index.html +4114 -1
- package/posts/52677/index.html +4125 -1
- package/posts/53662/index.html +4123 -1
- package/posts/54386/index.html +4116 -1
- package/posts/54481/index.html +4133 -1
- package/posts/54787/index.html +4124 -5
- package/posts/56467/index.html +4121 -1
- package/posts/57692/index.html +4143 -1
- package/posts/58203/index.html +4116 -1
- package/posts/61417/index.html +4117 -1
- package/posts/61712/index.html +4113 -1
- package/posts/646/index.html +4106 -1
- package/posts/64856/index.html +4120 -1
- package/posts/64935/index.html +4120 -1
- package/search.xml +84 -84
- package/seas/index.html +4050 -1
- package/sw.js +798 -2
- package/tags/Flash/347/233/270/345/205/263/index.html +3924 -1
- package/tags/Steam/346/270/270/346/210/217/index.html +3924 -1
- package/tags/Windows/350/275/257/344/273/266/index.html +3997 -1
- package/tags/index.html +4033 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +4570 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +4485 -1
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +4073 -1
- package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +3924 -1
- package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +3925 -1
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +3920 -1
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +4148 -1
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +3924 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +4610 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +4148 -1
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +4224 -1
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +4075 -1
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +4072 -1
- package/update/index.html +4112 -1
- package/weichuncai/css/style.css +25 -2
- package/weichuncai/js/common.js +449 -2
- package/weichuncai/js/jquery.js +139 -2
- package/weichuncai/wcc-config.js +17 -2
- package/maps/assets/algolia/algoliasearch.js.map +0 -1
- package/maps/assets/algolia/algoliasearchLite.js.map +0 -1
- package/maps/bbs/bbs.js.map +0 -1
- package/maps/css/custom2.css.map +0 -1
- package/maps/css/first.css.map +0 -1
- package/maps/css/pace/big-counter.css.map +0 -1
- package/maps/css/pace/corner-indicator.css.map +0 -1
- package/maps/css/pace/flash.css.map +0 -1
- package/maps/css/pace/mac-osx.css.map +0 -1
- package/maps/css/pace/pace.css.map +0 -1
- package/maps/css/plane.css.map +0 -1
- package/maps/css/style.css.map +0 -1
- package/maps/css/tags.css.map +0 -1
- package/maps/js/app.js.map +0 -1
- package/maps/js/autoload.js.map +0 -1
- package/maps/js/ceta/fancybox.css.map +0 -1
- package/maps/js/ceta/fancybox.umd.js.map +0 -1
- package/maps/js/ceta/iconfontInkss.js.map +0 -1
- package/maps/js/ceta/message.css.map +0 -1
- package/maps/js/ceta/message.js.map +0 -1
- package/maps/js/clock.js.map +0 -1
- package/maps/js/kslink.js.map +0 -1
- package/maps/js/newyear.js.map +0 -1
- package/maps/js/plane.js.map +0 -1
- package/maps/js/plugins/aplayer.js.map +0 -1
- package/maps/js/plugins/parallax.js.map +0 -1
- package/maps/js/plugins/rightMenus.js.map +0 -1
- package/maps/js/plugins/tags/contributors.js.map +0 -1
- package/maps/js/plugins/tags/friends.js.map +0 -1
- package/maps/js/plugins/tags/sites.js.map +0 -1
- package/maps/js/search/algolia.js.map +0 -1
- package/maps/js/search/hexo.js.map +0 -1
- package/maps/js/search/meilisearch.js.map +0 -1
- package/maps/js/txmap.js.map +0 -1
- package/maps/sw.js.map +0 -1
- package/maps/weichuncai/css/style.css.map +0 -1
- package/maps/weichuncai/js/common.js.map +0 -1
- package/maps/weichuncai/js/jquery.js.map +0 -1
- package/maps/weichuncai/wcc-config.js.map +0 -1
package/weichuncai/css/style.css
CHANGED
@@ -1,2 +1,25 @@
|
|
1
|
-
#smchuncai{opacity
|
2
|
-
|
1
|
+
#smchuncai {opacity:0.85;width:160px;height:160px;position:fixed;top:400px;left:800px;font-size:12px;}
|
2
|
+
* html #smchuncai {position:absolute;}
|
3
|
+
#chuncaiface {width:160px;height:160px;background-repeat:no-repeat;position:absolute;top:0px;left:0px;}
|
4
|
+
/*#chuncaimenu {width:46px;line-height:16px;float:left;font-size:12px;cursor:pointer;background-color:#666;color:#FFF;text-align:center;}*/
|
5
|
+
#showchuncaimenu {float:left;text-align:left;width:100%;overflow:hidden;display:none;}
|
6
|
+
/*#showchuncaimenu ul, */#tempsaying ul {margin:1px 0px 0px 0px;padding:0px 0px 0px 5px;float:left;width:100%;line-height:16px;cursor:pointer;overflow:hidden;}
|
7
|
+
.wcc_mlist {text-align:center;width:47%;float:left;line-height:16px;margin:0;padding:0px 0px 4px 0px;cursor:pointer;overflow:hidden;}
|
8
|
+
#tempsaying ul {width:96%;}
|
9
|
+
#callchuncai {position:fixed;width:60px;line-height:16px;cursor:pointer;display:none;font-size:12px;border:1px solid #e87a73;background-color:#FFF;}
|
10
|
+
* html #callchuncai {position:absolute;}
|
11
|
+
#dialog_chat {position:absolute;top:0px;left:-205px;width:200px;line-height:23px;text-align:left;}
|
12
|
+
#dialog_chat_loading {width:200px;height:30px;background:url("../imgs/loading.gif") no-repeat center center;display:none;}
|
13
|
+
#chat_top {float:left;width:200px;height:5px;overflow:hidden;background:url("../imgs/chat_top.gif") no-repeat;}
|
14
|
+
#dialog_chat_contents, #chuncaisaying, #getmenu, #tempsaying {float:left;margin:0;padding-left:0px;width:198px;line-height:23px;background-color:#ffffee;}
|
15
|
+
#getmenu, #tempsaying,#chuncaisaying {padding:0px 0px 0px 2px; width:196px;}
|
16
|
+
#dialog_chat_contents {width:198px;border-left:1px solid #e87a73;border-right:1px solid #e87a73;}
|
17
|
+
#chat_bottom {width:200px;height:10px;float:left;background:url("../imgs/chat_bottom.gif") no-repeat;}
|
18
|
+
#chat_top, #chat_bottom {}
|
19
|
+
#tempsaying, #hiddenfaces {display:none;}
|
20
|
+
#getmenu {width:95%;height:16px;margin:0;padding:0;cursor:pointer;background:url("../imgs/menu.jpg") no-repeat top right;}
|
21
|
+
#addinput {width:240px;height:20px;position:absolute;top:150px;left:-260px;border:1px solid #888;background-color:#FFF;padding-top:2px;overflow:hidden;display:none;}
|
22
|
+
#inp_l {float:left;width:220px;height:20px;}
|
23
|
+
#inp_r {float:right;width:20px;height:20px;font-size:12px;text-align:center;cursor:pointer;}
|
24
|
+
#talk {border:none;float:left;width:180px;height:16px;}
|
25
|
+
#talkto {float:left;border:none;width:30px;height:16px;background:url("../imgs/ok.jpg");cursor:pointer;}
|
package/weichuncai/js/common.js
CHANGED
@@ -1,2 +1,449 @@
|
|
1
|
-
var smjq
|
2
|
-
|
1
|
+
var smjq = jQuery;
|
2
|
+
var _typei = 0;
|
3
|
+
var weichuncai_text = '';
|
4
|
+
smjq(document).ready(function(){
|
5
|
+
var getwidth = getCookie("historywidth");
|
6
|
+
var getheight = getCookie("historyheight");
|
7
|
+
if(getwidth != null && getheight != null){
|
8
|
+
var width = getwidth;
|
9
|
+
var height = getheight;
|
10
|
+
}else{
|
11
|
+
var width = document.documentElement.clientWidth- 200 - imagewidth;
|
12
|
+
var height = document.documentElement.clientHeight- 180 - imageheight;
|
13
|
+
}
|
14
|
+
|
15
|
+
var cwidth = document.documentElement.clientWidth-100;
|
16
|
+
var cheight = document.documentElement.clientHeight-20;
|
17
|
+
//var height = document.body.clientHeight-200;
|
18
|
+
var moveX = 0;
|
19
|
+
var moveY = 0;
|
20
|
+
var moveTop = 0;
|
21
|
+
var moveLeft = 0;
|
22
|
+
var moveable = false;
|
23
|
+
var docMouseMoveEvent = document.onmousemove;
|
24
|
+
var docMouseUpEvent = document.onmouseup;
|
25
|
+
|
26
|
+
smjq("body").append('<div id="smchuncai" onfocus="this.blur();" style="color:#626262;z-index:999;"><div id="chuncaiface"></div><div id="dialog_chat"><div id="chat_top"></div><div id="dialog_chat_contents"><div id="dialog_chat_loading"></div><div id="tempsaying"></div><div id="showchuncaimenu"><ul class="wcc_mlist" id="shownotice">显示公告</ul><ul class="wcc_mlist" id="chatTochuncai">聊 天</ul><ul class="wcc_mlist" id="foods">吃 零 食</ul><ul class="wcc_mlist" id="aboutmanage">关 于</ul><ul class="wcc_mlist" id="lifetimechuncai">生存时间</ul><ul class="wcc_mlist" id="closechuncai">关闭春菜</ul></div><div><ul id="chuncaisaying"></ul></div><div id="getmenu"> </div></div><div id="chat_bottom"></div></div></div>');
|
27
|
+
smjq("#smchuncai").append('<div id="addinput"><div id="inp_l"><input id="talk" type="text" name="mastersay" value="" /> <input id="talkto" type="button" value=" " /></div><div id="inp_r"> X </div></div>');
|
28
|
+
smjq("body").append('<div id="callchuncai">召唤春菜</div>');
|
29
|
+
//判断春菜是否处于隐藏状态
|
30
|
+
var is_closechuncai = getCookie("is_closechuncai");
|
31
|
+
if(is_closechuncai == 'close'){
|
32
|
+
closechuncai_init();
|
33
|
+
}
|
34
|
+
//设置初始状态
|
35
|
+
getdata("getnotice");
|
36
|
+
setFace(1);
|
37
|
+
|
38
|
+
smjq("#smchuncai").css('left', width+'px');
|
39
|
+
smjq("#smchuncai").css('top', height+'px');
|
40
|
+
smjq("#smchuncai").css('width', imagewidth+'px');
|
41
|
+
smjq("#smchuncai").css('height', imageheight+'px');
|
42
|
+
smjq("#callchuncai").attr("style", "top:"+cheight+"px; left:"+cwidth+"px; text-align:center;");
|
43
|
+
|
44
|
+
smcc = document.getElementById("smchuncai");
|
45
|
+
smcc.onmousedown = function(){
|
46
|
+
var ent = getEvent();
|
47
|
+
moveable = true;
|
48
|
+
moveX = ent.clientX;
|
49
|
+
moveY = ent.clientY;
|
50
|
+
var obj = document.getElementById("smchuncai");
|
51
|
+
moveTop = parseInt(obj.style.top);
|
52
|
+
moveLeft = parseInt(obj.style.left);
|
53
|
+
if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
|
54
|
+
window.getSelection().removeAllRanges();
|
55
|
+
}
|
56
|
+
document.onmousemove = function(){
|
57
|
+
if(moveable){
|
58
|
+
var ent = getEvent();
|
59
|
+
var x = moveLeft + ent.clientX - moveX;
|
60
|
+
var y = moveTop + ent.clientY - moveY;
|
61
|
+
var w = 200;
|
62
|
+
var h = 200; //w,h为浮层宽高
|
63
|
+
obj.style.left = x + "px";
|
64
|
+
obj.style.top = y + "px";
|
65
|
+
}
|
66
|
+
};
|
67
|
+
document.onmouseup = function(){
|
68
|
+
if(moveable){
|
69
|
+
var historywidth = obj.style.left;
|
70
|
+
var historyheight = obj.style.top;
|
71
|
+
historywidth = historywidth.replace('px', '');
|
72
|
+
historyheight = historyheight.replace('px', '');
|
73
|
+
setCookie("historywidth", historywidth, 60*60*24*30*1000);
|
74
|
+
setCookie("historyheight", historyheight, 60*60*24*30*1000);
|
75
|
+
document.onmousemove = docMouseMoveEvent;
|
76
|
+
document.onmouseup = docMouseUpEvent;
|
77
|
+
moveable = false;
|
78
|
+
moveX = 0;
|
79
|
+
moveY = 0;
|
80
|
+
moveTop = 0;
|
81
|
+
moveLeft = 0;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
};
|
85
|
+
smjq("#getmenu").click(function(){
|
86
|
+
chuncaiMenu();
|
87
|
+
setFace(1);
|
88
|
+
});
|
89
|
+
smjq("#shownotice").click(function(){
|
90
|
+
getdata("getnotice");
|
91
|
+
setFace(1);
|
92
|
+
});
|
93
|
+
smjq("#closechuncai").click(function(){
|
94
|
+
setFace(3);
|
95
|
+
closechuncai();
|
96
|
+
});
|
97
|
+
smjq("#callchuncai").click(function(){
|
98
|
+
setFace(2);
|
99
|
+
callchuncai();
|
100
|
+
setCookie("is_closechuncai", '', 60*60*24*30*1000);
|
101
|
+
});
|
102
|
+
smjq("#shownotice").click(function(){
|
103
|
+
setFace(1);
|
104
|
+
closeChuncaiMenu();
|
105
|
+
});
|
106
|
+
smjq("#lifetimechuncai").click(function(){
|
107
|
+
closeChuncaiMenu();
|
108
|
+
closeNotice();
|
109
|
+
setFace(2);
|
110
|
+
getdata('showlifetime');
|
111
|
+
});
|
112
|
+
smjq("#chatTochuncai").click(function(){
|
113
|
+
showInput();
|
114
|
+
});
|
115
|
+
smjq("#inp_r").click(function(){
|
116
|
+
closeInput();
|
117
|
+
chuncaiSay('不聊天了吗?(→_→)');
|
118
|
+
setFace(3);
|
119
|
+
});
|
120
|
+
smjq("#talkto").click(function(){
|
121
|
+
getdata("talking");
|
122
|
+
});
|
123
|
+
smjq("#aboutmanage").click(function(){
|
124
|
+
closeChuncaiMenu();
|
125
|
+
closeNotice();
|
126
|
+
smjq("#getmenu").css("display", "none");
|
127
|
+
chuncaiSay("你想了解我主人?跟我来吧~~~");
|
128
|
+
setFace(2);
|
129
|
+
setTimeout(function(){
|
130
|
+
window.location.href = _about_path ;
|
131
|
+
}, 2000);
|
132
|
+
});
|
133
|
+
smjq("#foods").click(function(){
|
134
|
+
closeChuncaiMenu();
|
135
|
+
closeNotice();
|
136
|
+
getdata("foods");
|
137
|
+
});
|
138
|
+
/* smjq("#showchuncaimenu").hover(function(){
|
139
|
+
},function(){
|
140
|
+
smjq("#showchuncaimenu").slideUp('slow').show();
|
141
|
+
});*/
|
142
|
+
document.onmousemove = function(){
|
143
|
+
stoptime();
|
144
|
+
tol = 0;
|
145
|
+
setTime();
|
146
|
+
//chuncaiSay("啊,野生的主人出现了! ~~~O口O");
|
147
|
+
}
|
148
|
+
talkSelf(talktime);
|
149
|
+
document.getElementById("smchuncai").onmouseover = function(){
|
150
|
+
if(talkobj){
|
151
|
+
clearTimeout(talkobj);
|
152
|
+
}
|
153
|
+
talktime = 0;
|
154
|
+
talkSelf(talktime);
|
155
|
+
}
|
156
|
+
});
|
157
|
+
|
158
|
+
function getEvent() {
|
159
|
+
return window.event || arguments.callee.caller.arguments[0];
|
160
|
+
}
|
161
|
+
|
162
|
+
var eattimes = 0;
|
163
|
+
function eatfood(obj){
|
164
|
+
var gettimes = getCookie("eattimes");
|
165
|
+
if(parseInt(gettimes) > parseInt(9)){
|
166
|
+
chuncaiSay("主人是个大混蛋!!");
|
167
|
+
setFace(3);
|
168
|
+
closechuncai_evil();
|
169
|
+
}else if(parseInt(gettimes) > parseInt(7)){
|
170
|
+
chuncaiSay(".....................肚子要炸了,死也不要再吃了~~!!!TAT");
|
171
|
+
setFace(3);
|
172
|
+
}else if(parseInt(gettimes) == parseInt(5)){
|
173
|
+
chuncaiSay("我已经吃饱了,不要再吃啦......");
|
174
|
+
setFace(3);
|
175
|
+
}else if(parseInt(gettimes) == parseInt(3)){
|
176
|
+
chuncaiSay("多谢款待,我吃饱啦~~~ ╰( ̄▽ ̄)╭");
|
177
|
+
setFace(2);
|
178
|
+
}else{
|
179
|
+
var id = obj.replace("f",'');
|
180
|
+
getdata('eatsay', id);
|
181
|
+
}
|
182
|
+
eattimes++;
|
183
|
+
setCookie("eattimes", eattimes, 60*10*1000);
|
184
|
+
}
|
185
|
+
function chuncaiMenu(){
|
186
|
+
//smjq("#showchuncaimenu").slideDown('fast').show();
|
187
|
+
clearChuncaiSay();
|
188
|
+
closeInput();
|
189
|
+
chuncaiSay("准备做什么呢?");
|
190
|
+
smjq("#showchuncaimenu").css("display", "block");
|
191
|
+
smjq("#getmenu").css("display", "none");
|
192
|
+
smjq("#chuncaisaying").css("display", "none");
|
193
|
+
}
|
194
|
+
function closeChuncaiMenu(){
|
195
|
+
clearChuncaiSay();
|
196
|
+
smjq("#showchuncaimenu").css("display", "none");
|
197
|
+
//smjq("#chuncaisaying").css("display", "block");
|
198
|
+
showNotice();
|
199
|
+
smjq("#getmenu").css("display", "block");
|
200
|
+
}
|
201
|
+
function showNotice(){
|
202
|
+
smjq("#chuncaisaying").css("display", "block");
|
203
|
+
}
|
204
|
+
function closechuncai(){
|
205
|
+
stopTalkSelf();
|
206
|
+
chuncaiSay("记得再叫我出来哦...");
|
207
|
+
smjq("#showchuncaimenu").css("display", "none");
|
208
|
+
setTimeout(function(){
|
209
|
+
smjq("#smchuncai").fadeOut(1200);
|
210
|
+
smjq("#callchuncai").css("display", "block");}, 2000);
|
211
|
+
//保存关闭状态的春菜
|
212
|
+
setCookie("is_closechuncai", 'close', 60*60*24*30*1000);
|
213
|
+
}
|
214
|
+
function closechuncai_evil(){
|
215
|
+
stopTalkSelf();
|
216
|
+
smjq("#showchuncaimenu").css("display", "none");
|
217
|
+
setTimeout(function(){
|
218
|
+
smjq("#smchuncai").fadeOut(1200);
|
219
|
+
smjq("#callchuncai").css("display", "block");}, 2000);
|
220
|
+
}
|
221
|
+
function closechuncai_init(){
|
222
|
+
stopTalkSelf();
|
223
|
+
smjq("#showchuncaimenu").css("display", "none");
|
224
|
+
setTimeout(function(){
|
225
|
+
smjq("#smchuncai").css("display", "none");
|
226
|
+
smjq("#callchuncai").css("display", "block");}, 30);
|
227
|
+
}
|
228
|
+
function callchuncai(){
|
229
|
+
talkSelf(talktime);
|
230
|
+
smjq("#smchuncai").fadeIn('normal');
|
231
|
+
smjq("#callchuncai").css("display", "none");
|
232
|
+
closeChuncaiMenu();
|
233
|
+
closeNotice();
|
234
|
+
chuncaiSay("我回来啦~");
|
235
|
+
setCookie("is_closechuncai", '', 60*60*24*30*1000);
|
236
|
+
}
|
237
|
+
|
238
|
+
function chuncaiSay(s){
|
239
|
+
clearChuncaiSay();
|
240
|
+
smjq("#tempsaying").append(s);
|
241
|
+
smjq("#tempsaying").css("display", "block");
|
242
|
+
weichuncai_text = s;
|
243
|
+
typeWords();
|
244
|
+
}
|
245
|
+
function clearChuncaiSay(){
|
246
|
+
document.getElementById("tempsaying").innerHTML = '';
|
247
|
+
}
|
248
|
+
function closeNotice(){
|
249
|
+
smjq("#chuncaisaying").css("display", "none");
|
250
|
+
}
|
251
|
+
function showInput(){
|
252
|
+
closeChuncaiMenu();
|
253
|
+
closeNotice();
|
254
|
+
chuncaiSay("............?");
|
255
|
+
//setFace(1);
|
256
|
+
smjq("#addinput").css("display", "block");
|
257
|
+
}
|
258
|
+
function closeInput(){
|
259
|
+
setFace(3);
|
260
|
+
smjq("#addinput").css("display", "none");
|
261
|
+
}
|
262
|
+
function clearInput(){
|
263
|
+
document.getElementById("talk").value = '';
|
264
|
+
}
|
265
|
+
function createFace(a, b, c){
|
266
|
+
smjq("head").append('<div id="hiddenfaces"><img id="hf1" src="'+a+'" /><img id="hf2" src="'+b+'" /><img id="hf3" src="'+c+'" /></div>');
|
267
|
+
setFace(1);
|
268
|
+
}
|
269
|
+
function setFace(num){
|
270
|
+
obj = document.getElementById("hf"+num).src;
|
271
|
+
smjq("#chuncaiface").attr("style", "background:url("+obj+") no-repeat scroll 50% 0% transparent; width:"+imagewidth+"px;height:"+imageheight+"px;");
|
272
|
+
}
|
273
|
+
function getdata(el, id){
|
274
|
+
smjq.ajax({
|
275
|
+
type: 'GET',
|
276
|
+
url: _weichuncai_jsonpath,
|
277
|
+
cache: 'false',
|
278
|
+
dataType: 'html',
|
279
|
+
contentType: 'application/json; charset=utf8',
|
280
|
+
beforeSend: function(){
|
281
|
+
//smjq("#dialog_chat").fadeOut("normal");
|
282
|
+
smjq("#tempsaying").css('display', "none");
|
283
|
+
smjq("#dialog_chat_loading").fadeIn("normal");
|
284
|
+
},
|
285
|
+
success: function(data){
|
286
|
+
smjq("#dialog_chat_loading").css('display', "none");
|
287
|
+
//smjq("#dialog_chat").fadeIn("normal");
|
288
|
+
smjq("#tempsaying").css('display', "");
|
289
|
+
var dat = eval("("+data+")");
|
290
|
+
if(el == 'getnotice'){
|
291
|
+
chuncaiSay(dat.notice);
|
292
|
+
setFace(1);
|
293
|
+
}else if(el == 'showlifetime'){
|
294
|
+
BirthDay=new Date(dat.showlifetime);//建站日期
|
295
|
+
today=new Date();
|
296
|
+
timeold=(today.getTime()-BirthDay.getTime());
|
297
|
+
sectimeold=timeold/1000
|
298
|
+
secondsold=Math.floor(sectimeold);
|
299
|
+
msPerDay=24*60*60*1000
|
300
|
+
e_daysold=timeold/msPerDay
|
301
|
+
daysold=Math.floor(e_daysold);
|
302
|
+
e_hrsold=(daysold-e_daysold)*-24;
|
303
|
+
hrsold=Math.floor(e_hrsold);
|
304
|
+
e_minsold=(hrsold-e_hrsold)*-60;
|
305
|
+
minsold=Math.floor((hrsold-e_hrsold)*-60);
|
306
|
+
seconds=Math.floor((minsold-e_minsold)*-60);
|
307
|
+
chuncaiSay("我已经与主人 一起生存了 "+daysold+" 天 "+hrsold+" 小时 "+minsold+" 分钟 "+seconds+" 秒的快乐时光啦~*^_^*");
|
308
|
+
}else if(el == 'talking'){
|
309
|
+
var talkcon = smjq("#talk").val();
|
310
|
+
var i = in_array(talkcon, dat.ques);
|
311
|
+
var types = typeof(i);
|
312
|
+
if(types != 'boolean'){
|
313
|
+
chuncaiSay(dat.ans[i]);
|
314
|
+
setFace(2);
|
315
|
+
}else{
|
316
|
+
chuncaiSay('.......................嗯?');
|
317
|
+
setFace(3);
|
318
|
+
}
|
319
|
+
clearInput();
|
320
|
+
}else if(el == 'foods'){
|
321
|
+
var str='';
|
322
|
+
var arr = dat.foods;
|
323
|
+
var preg = /function/;
|
324
|
+
for(var i in arr){
|
325
|
+
if(arr[i] != '' && !preg.test(arr[i]) ){
|
326
|
+
str +='<ul id="f'+i+'" class="eatfood" onclick="eatfood(this.id)">'+arr[i]+'</ul>';
|
327
|
+
}
|
328
|
+
}
|
329
|
+
chuncaiSay(str);
|
330
|
+
}else if(el = "eatsay"){
|
331
|
+
var str = dat.eatsay[id];
|
332
|
+
chuncaiSay(str);
|
333
|
+
setFace(2);
|
334
|
+
}else if(el = "talkself"){
|
335
|
+
var arr = dat.talkself;
|
336
|
+
return arr;
|
337
|
+
}
|
338
|
+
},
|
339
|
+
error: function(){
|
340
|
+
chuncaiSay('好像出错了,是什么错误呢...请联系管理猿');
|
341
|
+
}
|
342
|
+
});
|
343
|
+
}
|
344
|
+
|
345
|
+
function in_array(str, arr){
|
346
|
+
for(var i in arr){
|
347
|
+
if(arr[i] == str){
|
348
|
+
return i;
|
349
|
+
}
|
350
|
+
}
|
351
|
+
return false;
|
352
|
+
}
|
353
|
+
|
354
|
+
var timenum;
|
355
|
+
var tol=0;
|
356
|
+
//10分钟后页面没有响应就停止活动
|
357
|
+
var goal = 10*60;
|
358
|
+
function setTime(){
|
359
|
+
tol++;
|
360
|
+
//document.body.innerHTML(tol);
|
361
|
+
timenum = window.setTimeout("setTime('"+tol+"')", 1000);
|
362
|
+
if(parseInt(tol) == parseInt(goal)){
|
363
|
+
stopTalkSelf();
|
364
|
+
closeChuncaiMenu();
|
365
|
+
closeNotice();
|
366
|
+
closeInput();
|
367
|
+
chuncaiSay("主人跑到哪里去了呢....");
|
368
|
+
setFace(3);
|
369
|
+
stoptime();
|
370
|
+
}
|
371
|
+
}
|
372
|
+
function stoptime(){
|
373
|
+
if(timenum){
|
374
|
+
clearTimeout(timenum);
|
375
|
+
}
|
376
|
+
}
|
377
|
+
var talktime = 0;
|
378
|
+
//设置自言自语频率(单位:秒)
|
379
|
+
var talkself = 60;
|
380
|
+
var talkobj;
|
381
|
+
var tsi = 0;
|
382
|
+
var talkself_arr = [
|
383
|
+
["白日依山尽,黄河入海流,欲穷千里目,更上.....一层楼?", "1"],
|
384
|
+
["我看见主人熊猫眼又加重了!", "3"],
|
385
|
+
["我是不是很厉害呀~~?", "2"],
|
386
|
+
["5555...昨天有个小孩子跟我抢棒棒糖吃.....", "3"],
|
387
|
+
["昨天我好像看见主人又在众人之前卖萌了哦~", "2"]
|
388
|
+
];
|
389
|
+
|
390
|
+
function talkSelf(talktime){
|
391
|
+
talktime++;
|
392
|
+
var yushu = talktime%talkself;
|
393
|
+
if(parseInt(yushu) == parseInt(9)){
|
394
|
+
closeChuncaiMenu();
|
395
|
+
closeNotice();
|
396
|
+
closeInput();
|
397
|
+
tsi = Math.floor(Math.random() * talkself_arr.length + 1)-1;
|
398
|
+
chuncaiSay(talkself_arr[tsi][0]);
|
399
|
+
setFace(talkself_arr[tsi][1]);
|
400
|
+
}
|
401
|
+
talkobj = window.setTimeout("talkSelf("+talktime+")", 1000);
|
402
|
+
}
|
403
|
+
function stopTalkSelf(){
|
404
|
+
if(talkobj){
|
405
|
+
clearTimeout(talkobj);
|
406
|
+
}
|
407
|
+
}
|
408
|
+
function arrayShuffle(arr){
|
409
|
+
var result = [],
|
410
|
+
len = arr.length;
|
411
|
+
while(len--){
|
412
|
+
result[result.length] = arr.splice(Math.floor(Math.random()*(len+1)),1);
|
413
|
+
}
|
414
|
+
return result;
|
415
|
+
}
|
416
|
+
|
417
|
+
|
418
|
+
function typeWords() {
|
419
|
+
var p = 1;
|
420
|
+
var str = weichuncai_text.substr(0,_typei);
|
421
|
+
var w = weichuncai_text.substr(_typei,1);
|
422
|
+
if(w=="<"){
|
423
|
+
str += weichuncai_text.substr(_typei,weichuncai_text.substr(_typei).indexOf(">")+1);
|
424
|
+
p= weichuncai_text.substr(_typei).indexOf(">")+1;
|
425
|
+
}
|
426
|
+
_typei+=p;
|
427
|
+
document.getElementById("tempsaying").innerHTML = str;
|
428
|
+
txtst = setTimeout("typeWords()",20);
|
429
|
+
if (_typei> weichuncai_text.length){
|
430
|
+
clearTimeout(txtst);
|
431
|
+
_typei = 0;
|
432
|
+
}
|
433
|
+
}
|
434
|
+
|
435
|
+
function setCookie(name, val, ex){
|
436
|
+
var times = new Date();
|
437
|
+
times.setTime(times.getTime() + ex);
|
438
|
+
if(ex == 0){
|
439
|
+
document.cookie = name+"="+val+";";
|
440
|
+
}else{
|
441
|
+
document.cookie = name+"="+val+"; expires="+times.toGMTString();
|
442
|
+
}
|
443
|
+
}
|
444
|
+
|
445
|
+
function getCookie(name){
|
446
|
+
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
|
447
|
+
if(arr != null) return unescape(arr[2]); return null;
|
448
|
+
}
|
449
|
+
|