mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-22 21:35:08 +00:00
remove legacy migration code
This commit is contained in:
parent
7560727372
commit
4ee57da6f3
2 changed files with 1 additions and 30 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import "./fixes.css";
|
||||
|
||||
import { isWindows, localStorage } from "./utils";
|
||||
import { localStorage } from "./utils";
|
||||
|
||||
// Make clicking Notifications focus the window
|
||||
const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!;
|
||||
|
@ -22,14 +22,3 @@ Object.defineProperty(Notification.prototype, "onclick", {
|
|||
|
||||
// Hide "Download Discord Desktop now!!!!" banner
|
||||
localStorage.setItem("hideNag", "true");
|
||||
|
||||
// FIXME: Remove eventually.
|
||||
// Originally, Vencord always used a Windows user agent. This seems to cause captchas
|
||||
// Now, we use a platform specific UA - HOWEVER, discord FOR SOME REASON????? caches
|
||||
// device props in localStorage. This code fixes their cache to properly update the platform in SuperProps
|
||||
if (!isWindows)
|
||||
try {
|
||||
const deviceProperties = localStorage.getItem("deviceProperties");
|
||||
if (deviceProperties && JSON.parse(deviceProperties).os === "Windows")
|
||||
localStorage.removeItem("deviceProperties");
|
||||
} catch {}
|
||||
|
|
|
@ -14,8 +14,6 @@ import "./arrpc";
|
|||
console.log("read if cute :3");
|
||||
|
||||
export * as Components from "./components";
|
||||
import { onceReady } from "@vencord/types/webpack";
|
||||
import { Alerts } from "@vencord/types/webpack/common";
|
||||
|
||||
import SettingsUi from "./components/settings/Settings";
|
||||
import { Settings } from "./settings";
|
||||
|
@ -31,19 +29,3 @@ customSettingsSections.push(() => ({
|
|||
element: SettingsUi,
|
||||
className: "vc-vesktop-settings"
|
||||
}));
|
||||
|
||||
// TODO: remove soon
|
||||
const vencordDir = "vencordDir" as keyof typeof Settings.store;
|
||||
if (Settings.store[vencordDir]) {
|
||||
onceReady.then(() =>
|
||||
setTimeout(
|
||||
() =>
|
||||
Alerts.show({
|
||||
title: "Custom Vencord Location",
|
||||
body: "Due to security hardening changes in Vesktop, your custom Vencord location had to be reset. Please configure it again in the settings.",
|
||||
onConfirm: () => delete Settings.store[vencordDir]
|
||||
}),
|
||||
5000
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue