13 lines
200 B
JavaScript
13 lines
200 B
JavaScript
|
const positions = {};
|
||
|
|
||
|
export function getScrollPos(key) {
|
||
|
if (key in positions) {
|
||
|
return positions[key];
|
||
|
}
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
export function saveScrollPos(key, pos) {
|
||
|
positions[key] = pos;
|
||
|
}
|