测试界面:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 |
小无编辑摘要 |
||
第1行: | 第1行: | ||
function caonibaba(){ | |||
setInterval(function(){ var today=new Date(); | |||
$("[name='message']").val("/me"+today); | |||
$("[name='post']").submit();},1200000); | |||
} | |||
function caoniba(){ | |||
var today=new Date(); | |||
var s = today.getHours(); | |||
if (s>=4 && s<10) | |||
{ | |||
var times = "/me早上好"; | |||
} | |||
else if (s>=10 && s<13) | |||
{ | |||
var times = "/me中午好"; | |||
} | |||
else if (s>=13 && s<18) | |||
{ | |||
var times="/me下午好"; | |||
} | |||
else | |||
{ | |||
var times="/me晚上好"; | |||
} | |||
$("[name='message']").val(times); | |||
$("[name='post']").submit(); | |||
} | |||
var listen3 = $('#talks'); | |||
listen3.bind('DOMNodeInserted', function () { | |||
if ($("div#talks>:first-child").attr("class") == "talk join system") { | |||
caoniba(); | |||
} | |||
if ($("#talks > dl:nth-child(1):first-child").attr("class") == "talk san-2x") { | |||
caonibaba(); | |||
var today=new Date(); | |||
$("[name='message']").val("/me现在是"+today); | |||
$("[name='post']").submit(); | |||
} | |||
}); |
2020年3月4日 (三) 15:36的版本
function caonibaba(){ setInterval(function(){ var today=new Date();
$("[name='message']").val("/me"+today); $("[name='post']").submit();},1200000);
} function caoniba(){
var today=new Date();
var s = today.getHours();
if (s>=4 && s<10) {
var times = "/me早上好";
} else if (s>=10 && s<13) {
var times = "/me中午好";
}
else if (s>=13 && s<18) {
var times="/me下午好";
} else {
var times="/me晚上好";
}
$("[name='message']").val(times); $("[name='post']").submit();
}
var listen3 = $('#talks');
listen3.bind('DOMNodeInserted', function () {
if ($("div#talks>:first-child").attr("class") == "talk join system") { caoniba();
}
if ($("#talks > dl:nth-child(1):first-child").attr("class") == "talk san-2x") { caonibaba(); var today=new Date(); $("[name='message']").val("/me现在是"+today); $("[name='post']").submit();
}
});