Address issues
This commit is contained in:
parent
63fd14c094
commit
83dbc13bfb
1 changed files with 4 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-License-Identifier: GPL-3.0
|
* SPDX-License-Identifier: GPL-3.0
|
||||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
||||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -12,19 +12,11 @@ addPatch({
|
||||||
find: "platform-web",
|
find: "platform-web",
|
||||||
replacement: {
|
replacement: {
|
||||||
// eslint-disable-next-line no-useless-escape
|
// eslint-disable-next-line no-useless-escape
|
||||||
match: /return (?=__OVERLAY__\?""\.concat\((\i))/,
|
match: /(?<=" platform-overlay"\):)\i/,
|
||||||
replace: "$1=$self.getPlatformClass(); return "
|
replace: "$self.getPlatformClass()"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
getPlatformClass() {
|
getPlatformClass: () => (navigator.platform.toLowerCase().startsWith("mac") ? "platform-osx" : "platform-web")
|
||||||
const platform = navigator.platform.toLowerCase();
|
|
||||||
|
|
||||||
if (platform.includes("mac")) return "platform-osx";
|
|
||||||
if (platform.includes("win")) return "platform-win";
|
|
||||||
if (platform.includes("linux")) return "platform-linux";
|
|
||||||
|
|
||||||
return "platform-web";
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue