//META{"name":"p_1lib_discord_internals"}*// /*@cc_on @if (@_jscript) // Offer to self-install for clueless users that try to run this directly. var shell = WScript.CreateObject("WScript.Shell"); var fs = new ActiveXObject("Scripting.FileSystemObject"); var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins"); var pathSelf = WScript.ScriptFullName; // Put the user at ease by addressing them in the first person shell.Popup("It looks like you tried to run me directly. This is not desired behavior! It will work now, but likely will not work with other plugins. Even worse, with other untrusted plugins it may lead computer virus infection!", 0, "I'm a plugin for BetterDiscord", 0x30); if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) { shell.Popup("I'm in the correct folder already.\nJust reload Discord with Ctrl+R.", 0, "I'm already installed", 0x40); } else if (!fs.FolderExists(pathPlugins)) { shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10); } else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) { fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true); // Show the user where to put plugins in the future shell.Exec("explorer " + pathPlugins); shell.Popup("I'm installed!\nJust reload Discord with Ctrl+R.", 0, "Successfully installed", 0x40); } WScript.Quit(); @else @*/ var p_1lib_discord_internals = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(1); /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { const v1transpile_version = 6; module.exports = class { constructor() { const config = __webpack_require__(2); if (!window.v1transpile || window.v1transpile.version < v1transpile_version) { window.v1transpile = window.v1transpile || {}; window.v1transpile.version = v1transpile_version; window.v1transpile.Plugin = window.v1transpile.Plugin || __webpack_require__(3); window.v1transpile.PluginApi = window.v1transpile.PluginApi || __webpack_require__(4); window.v1transpile.PluginStorage = window.v1transpile.PluginStorage || __webpack_require__(7); window.v1transpile.Settings = window.v1transpile.Settings || { /** * Create and return a new top-level settings panel * @author noodlebox * @return {jQuery} */ topPanel() { return $("
").addClass("form").css("width", "100%"); }, /** * Create and return a container for control groups * @author noodlebox * @return {jQuery} */ controlGroups() { return $("
").addClass("control-groups"); }, /** * Create and return a flexible control group * @author noodlebox * @param {object} settings Settings object * @param {Element|jQuery|string} settings.label an element or something JQuery-ish or, if string, use as plain text * @return {jQuery} */ controlGroup(settings) { const group = $("
").addClass("control-group"); if (typeof settings.label === "string") { group.append($("