dotfiles/vesktop/vencordDist/vencordDesktopPreload.js.map

8 lines
9.1 KiB
Plaintext
Raw Normal View History

2023-11-14 11:41:09 -06:00
{
"version": 3,
"sources": ["../src/utils/debounce.ts", "../src/preload.ts", "../src/VencordNative.ts"],
"sourcesContent": ["/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n*/\n\n/**\n * Returns a new function that will call the wrapped function\n * after the specified delay. If the function is called again\n * within the delay, the timer will be reset.\n * @param func The function to wrap\n * @param delay The delay in milliseconds\n */\nexport function debounce<T extends Function>(func: T, delay = 300): T {\n let timeout: NodeJS.Timeout;\n return function (...args: any[]) {\n clearTimeout(timeout);\n timeout = setTimeout(() => { func(...args); }, delay);\n } as any;\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n*/\n\nimport { debounce } from \"@utils/debounce\";\nimport { contextBridge, webFrame } from \"electron\";\nimport { readFileSync, watch } from \"fs\";\nimport { join } from \"path\";\n\nimport VencordNative from \"./VencordNative\";\n\ncontextBridge.exposeInMainWorld(\"VencordNative\", VencordNative);\n\n// Discord\nif (location.protocol !== \"data:\") {\n // #region cssInsert\n const rendererCss = join(__dirname, IS_VESKTOP ? \"vencordDesktopRenderer.css\" : \"renderer.css\");\n\n const style = document.createElement(\"style\");\n style.id = \"vencord-css-core\";\n style.textContent = readFileSync(rendererCss, \"utf-8\");\n\n if (document.readyState === \"complete\") {\n document.documentElement.appendChild(style);\n } else {\n document.addEventListener(\"DOMContentLoaded\", () => document.documentElement.appendChild(style), {\n once: true\n });\n }\n\n if (IS_DEV) {\n // persistent means keep process running if watcher is the only thing still running\n // which we obviously don't want\n watch(rendererCss, { persistent: false }, () => {\n document.getElementById(\"vencord-css-core\")!.textContent = readFileSync(rendererCss, \"utf-8\");\n });\n }\n // #endregion\n\n if (IS_DISCORD_DESKTOP) {\n webFrame.executeJavaScript(readFileSync(join(__dirname, \"renderer.js\"), \"utf-8\"));\n require(process.env.DISCORD_PRELOAD!);\n }\n} // Monaco popout\nelse {\n contextBridge.exposeInMainWorld(\"setCss\", debounce(VencordNative.quickCss.set));\n contextBridge.exposeInMainWorld(\"getCurrentCss\", VencordNative.quickCss.get);\n // shrug\n contextBridge.exposeInMainWorld(\"getTheme\", () => \"vs-dark\");\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { IpcRes } from \"@utils/types\";
"mappings": ";;;;aAyBO,SAASA,EAA6BC,EAASC,EAAQ,IAAQ,CAClE,IAAIC,EACJ,OAAO,YAAaC,EAAa,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAM,CAAEF,EAAK,GAAGG,CAAI,CAAG,EAAGF,CAAK,CACxD,CACJ,CCZA,IAAAG,EAAwC,oBACxCC,EAAoC,cACpCC,EAAqB,gBCbrB,IAAAC,EAA4B,oBAI5B,SAASC,EAAgBC,KAAqBC,EAAa,CACvD,OAAO,cAA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,YAAa,IAAM,QAAQ,SAC3B,aAAekB,GAAgBlB,wBAAsCkB,CAAG,CAC5E,EAEA,cAAed,CACnB,EDlDA,gBAAc,kBAAkB,gBAAiBe,CAAa,EAG9D,GAAI,SAAS,WAAa,QAAS,CAE/B,IAAMC,KAAc,QAAK,UAAwB,4BAA6C,EAExFC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,GAAK,mBACXA,EAAM,eAAc,gBAAaD,EAAa,OAAO,EAEjD,SAAS,aAAe,WACxB,SAAS,gBAAgB,YAAYC,CAAK,EAE1C,SAAS,iBAAiB,mBAAoB,IAAM,SAAS,gBAAgB,YAAYA,CAAK,EAAG,CAC7F,KAAM,EACV,CAAC,CAgBT,MAEI,gBAAc,kBAAkB,SAAUC,EAASH,EAAc,SAAS,GAAG,CAAC,EAC9E,gBAAc,kBAAkB,gBAAiBA,EAAc,SAAS,GAAG,EAE3E,gBAAc,kBAAkB,WAAY,IAAM,SAAS",
"names": ["debounce", "func", "delay", "timeout", "args", "import_electron", "import_fs", "import_path", "import_electron", "invoke", "event", "args", "sendSync", "PluginHelpers", "pluginIpcMap", "plugin", "methods", "map", "methodName", "method", "VencordNative_default", "fileName", "fileData", "settings", "css", "cb", "_", "url", "VencordNative_default", "rendererCss", "style", "debounce"]
}