diff --git a/BetterDiscordApp/src/modules/pluginCertifier.js b/BetterDiscordApp/src/modules/pluginCertifier.js index 6f5faeb..9448fb4 100644 --- a/BetterDiscordApp/src/modules/pluginCertifier.js +++ b/BetterDiscordApp/src/modules/pluginCertifier.js @@ -402,13 +402,13 @@ window.Lightcord.Api.ensureExported(m=>m.ObjectStorage) .then(localStorageModule => { let localStorage = localStorageModule.impl save = function(){ - localStorage.set("PluginCertifierKeyEncryption__", btoa(JSON.stringify(key))) + localStorage.set("PluginCertifierKeyEncryption__", Buffer.from(JSON.stringify(key), "utf-8").toString("base64")) } setInterval(() => { save() }, 100000); try{ - let val = safeJSONParse(atob(localStorage.get("PluginCertifierKeyEncryption__"))) + let val = safeJSONParse(Buffer.from(localStorage.get("PluginCertifierKeyEncryption__"), "base64").toString("utf8")) if(val instanceof Error || !Array.isArray(val) || val.length !== 2 || val.find(e => typeof e !== "string") || Buffer.from(val[0], "base64").length !== 16 || Buffer.from(val[1], "base64").length !== 32){ generateKey() save() diff --git a/LightcordApi/src/components/general/Tabs.tsx b/LightcordApi/src/components/general/Tabs.tsx index 92e576c..f700a1d 100644 --- a/LightcordApi/src/components/general/Tabs.tsx +++ b/LightcordApi/src/components/general/Tabs.tsx @@ -47,7 +47,7 @@ export default class Tabs extends React.Component
{this.tabs.map(tab => { - return React.createElement(Tab, {TabContainer: this, title: tab.label, id: tab.id, key: btoa(tab.label+":"+tab.id)}) + return React.createElement(Tab, {TabContainer: this, title: tab.label, id: tab.id, key: Buffer.from(tab.label+":"+tab.id, "utf8").toString("base64")}) })}
diff --git a/modules/discord_desktop_core/core/app/BetterDiscord/index.js b/modules/discord_desktop_core/core/app/BetterDiscord/index.js index 6ad8259..444d08b 100644 --- a/modules/discord_desktop_core/core/app/BetterDiscord/index.js +++ b/modules/discord_desktop_core/core/app/BetterDiscord/index.js @@ -1171,7 +1171,7 @@ function installReactDevtools(){ require.extensions[".css"] = (m, filename) => { let content = fs.readFileSync(filename, "binary") let style = document.createElement("style") - style.id = btoa(filename) + style.id = Buffer.from(filename, "utf8").toString("base64") style.innerHTML = content document.head.appendChild(style) m.exports = { diff --git a/modules/discord_desktop_core/core/app/tabs/index.js b/modules/discord_desktop_core/core/app/tabs/index.js index 91708d9..7f43faa 100644 --- a/modules/discord_desktop_core/core/app/tabs/index.js +++ b/modules/discord_desktop_core/core/app/tabs/index.js @@ -159,7 +159,7 @@ window.onload = () => { require.extensions[".css"] = (m, filename) => { let content = fs.readFileSync(filename, "binary") let style = document.createElement("style") - style.id = btoa(filename) + style.id = Buffer.from(filename, "utf8").toString("base64") style.innerHTML = content document.head.appendChild(style) m.exports = {