Skip to content

Commit

Permalink
update auto refresh time
Browse files Browse the repository at this point in the history
  • Loading branch information
henices committed Dec 2, 2024
1 parent c3e5bee commit 0305544
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,16 @@ function getLinkUrl(obj){

var base = curTime.getFullYear() + '/' + (curTime.getMonth() + 1) + '/' + curTime.getDate() + ' ';
var startAM = base + '09:15:00'; // 早盘开盘时间
var endAM = base + '11:30:00'; // 早盘开盘时间
var endAM = base + '12:00:00'; // 早盘开盘时间
var startPM = base + '13:00:00'; // 午盘开盘时间
var endPM = base + '15:00:00'; // 午盘闭盘时间
var endPM = base + '16:00:00'; // 午盘闭盘时间

if(+curTime < +new Date(startAM) || ( +new Date(endAM) < +curTime && +curTime < +new Date(startPM) ) || +curTime > +new Date(endPM) ){
var startUS = base + '21:30:00';
var endUS = base + '05:00:00'

if( ( +new Date(endAM) < +curTime && +curTime < +new Date(startPM) ) ||
( +curTime > +new Date(endPM) && +curTime < +new Date(startUS) ) ||
( +curTime > +new Date(endUS) && +curTime < +new Date(startAM) ) ) {
clearInterval(timer);
}
})();
Expand Down
6 changes: 3 additions & 3 deletions suggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@
continue;
}
if (data[i][0] == 'us') {
console.log(data[i])
data[i][1] = data[i][1].replace('.oq', '').replace('.n', '').replace('.am', '').replace('.ps', '')
data[i][1] = data[i][1].toUpperCase()
console.log(data[i]);
data[i][1] = data[i][1].replace('.oq', '').replace('.n', '').replace('.am', '').replace('.ps', '');
data[i][1] = data[i][1].toUpperCase();
}
htmlStr.push(utils.tmpl( tpl , data[i] ));
}
Expand Down

0 comments on commit 0305544

Please sign in to comment.