2024-10-15 14:57:26 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2024 New Vector Ltd.
|
|
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
|
|
|
|
*/
|
|
|
|
|
|
2021-09-02 20:30:12 +02:00
|
|
|
/**
|
|
|
|
|
* Because we've been saving a lot of additional logger data in the localStorage for no particular reason
|
|
|
|
|
* we need to, hopefully, unbrick user's devices by geting rid of unnecessary data.
|
|
|
|
|
* */
|
|
|
|
|
|
|
|
|
|
if (window.localStorage) {
|
|
|
|
|
Object.keys(window.localStorage).forEach((key) => {
|
2024-07-31 11:03:18 +01:00
|
|
|
if (key.startsWith("loglevel:")) {
|
2021-09-02 20:30:12 +02:00
|
|
|
window.localStorage.removeItem(key);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|