mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-02 12:14:07 +03:00
21 lines
514 B
TypeScript
21 lines
514 B
TypeScript
import { addClass } from 'support';
|
|
|
|
{
|
|
const { body } = document;
|
|
const url = new URL(window.location.toString());
|
|
const params = url.searchParams;
|
|
|
|
['nss', 'fbg', 'ccp', 'po', 'fo', 'tvp'].forEach((param) => {
|
|
const paramValue = Boolean(params.get(param));
|
|
|
|
if (paramValue) {
|
|
addClass(body, param);
|
|
} else {
|
|
document.getElementById(param)?.addEventListener('click', () => {
|
|
params.set(param, 'true');
|
|
window.location.assign(url.toString());
|
|
});
|
|
}
|
|
});
|
|
}
|