remove legacy migration code

This commit is contained in:
Vendicated 2025-02-06 03:47:34 +01:00
parent 7560727372
commit 4ee57da6f3
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
2 changed files with 1 additions and 30 deletions

View file

@ -6,7 +6,7 @@
import "./fixes.css"; import "./fixes.css";
import { isWindows, localStorage } from "./utils"; import { localStorage } from "./utils";
// Make clicking Notifications focus the window // Make clicking Notifications focus the window
const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!; const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!;
@ -22,14 +22,3 @@ Object.defineProperty(Notification.prototype, "onclick", {
// Hide "Download Discord Desktop now!!!!" banner // Hide "Download Discord Desktop now!!!!" banner
localStorage.setItem("hideNag", "true"); 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 {}

View file

@ -14,8 +14,6 @@ import "./arrpc";
console.log("read if cute :3"); console.log("read if cute :3");
export * as Components from "./components"; 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 SettingsUi from "./components/settings/Settings";
import { Settings } from "./settings"; import { Settings } from "./settings";
@ -31,19 +29,3 @@ customSettingsSections.push(() => ({
element: SettingsUi, element: SettingsUi,
className: "vc-vesktop-settings" 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
)
);
}