mirror of
https://github.com/chylex/TweetDuck.git
synced 2024-11-23 17:42:46 +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();
|
|
}
|