mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-01 10:01:21 +08:00
- Multi-AI competition mode (Qwen vs DeepSeek) - Binance Futures integration - AI self-learning mechanism - Professional web dashboard - Complete risk management system
19 lines
587 B
JavaScript
19 lines
587 B
JavaScript
import canUseDOM from './canUseDOM';
|
|
var size;
|
|
export default function scrollbarSize(recalc) {
|
|
if (!size && size !== 0 || recalc) {
|
|
if (canUseDOM) {
|
|
var scrollDiv = document.createElement('div');
|
|
scrollDiv.style.position = 'absolute';
|
|
scrollDiv.style.top = '-9999px';
|
|
scrollDiv.style.width = '50px';
|
|
scrollDiv.style.height = '50px';
|
|
scrollDiv.style.overflow = 'scroll';
|
|
document.body.appendChild(scrollDiv);
|
|
size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
|
document.body.removeChild(scrollDiv);
|
|
}
|
|
}
|
|
|
|
return size;
|
|
} |