Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
567 B

2 years ago
export default function getScrollPadding() {
const container = document.createElement('div');
container.classList.add('scrollable', 'scrollable-y');
container.style.cssText = 'width: 100px; height: 100px; position: absolute; top: -9999px;';
const child = document.createElement('div');
child.style.cssText = 'width: 100%; height: 110px;';
container.append(child);
document.body.append(container);
const diff = container.offsetWidth - child.offsetWidth;
container.remove();
return diff;
}
(window as any).testBuggedScroll = getScrollPadding;