mirror of
https://github.com/chylex/TweetDuck.git
synced 2024-12-04 22:42:49 +01:00
18 lines
253 B
JavaScript
18 lines
253 B
JavaScript
let isReloading = false;
|
|
|
|
/**
|
|
* Reloads the website with memory cleanup if available.
|
|
*/
|
|
export function reloadBrowser() {
|
|
if (isReloading) {
|
|
return;
|
|
}
|
|
|
|
if ("gc" in window) {
|
|
window.gc();
|
|
}
|
|
|
|
isReloading = true;
|
|
window.location.reload();
|
|
}
|