mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
3 lines
No EOL
7.7 KiB
JavaScript
3 lines
No EOL
7.7 KiB
JavaScript
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"index.js":[function(require,module,exports) {
|
|
"use strict";function e(e,n){return s(e)||r(e,n)||t(e,n)||o()}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function t(e,o){if(e){if("string"==typeof e)return n(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,o):void 0}}function n(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}function r(e,o){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,r=!1,s=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done)&&(t.push(a.value),!o||t.length!==o);n=!0);}catch(u){r=!0,s=u}finally{try{n||null==i.return||i.return()}finally{if(r)throw s}}return t}}function s(e){if(Array.isArray(e))return e}function a(e,o,t,n,r,s,a){try{var i=e[s](a),u=i.value}catch(c){return void t(c)}i.done?o(u):Promise.resolve(u).then(n,r)}function i(e){return function(){var o=this,t=arguments;return new Promise(function(n,r){var s=e.apply(o,t);function i(e){a(s,n,r,i,u,"next",e)}function u(e){a(s,n,r,i,u,"throw",e)}i(void 0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var u="2.7.0",c={gooseModHandlers:{onImport:function(){var e=i(regeneratorRuntime.mark(function e(){var o,t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:goosemodScope.logger.debug("visualTweaks","Enabling Visual Tweaks"),goosemodScope.tweaks={removeHelpButton:!0,removeEmojiUpsell:!1,squareAvatars:!0,noMemberlistAvatars:!1,fixFolderColorPicker:!0},(o=window.document.styleSheets[0]).insertRule("body.square-avatars .avatar-1BDn8e {\n border-radius: 0px;\n }",o.cssRules.length),o.insertRule("body.no-emoji-popups .container-ZRw2kD {\n display:none;\n }",o.cssRules.length),o.insertRule("body.no-emoji-popups .emojiContainer-3X8SvE {\n cursor:default;\n }",o.cssRules.length),o.insertRule("body.no-memberlist-avatars .avatar-3uk_u9 {\n width: 5px;\n }",o.cssRules.length),o.insertRule("body.no-memberlist-avatars .avatar-3uk_u9 > div > svg > foreignObject {\n display: none;\n }",o.cssRules.length),o.insertRule("body.no-memberlist-avatars .avatar-3uk_u9 > div > svg > rect {\n transform: translate(-22px, -10px);\n }",o.cssRules.length),o.insertRule('body.no-help-button a[href="https://support.discord.com"] > div[role="button"] {\n display: none;\n }',o.cssRules.length),o.insertRule("body.fix-folder-color-picker .container-3sNMIc {\n flex-wrap: inherit\n }",o.cssRules.length),t={removeHelpButton:{enable:function(){document.body.classList.add("no-help-button")},disable:function(){document.body.classList.remove("no-help-button")}},removeEmojiUpsell:{enable:function(){document.body.classList.add("no-emoji-popups")},disable:function(){document.body.classList.remove("no-emoji-popups")}},squareAvatars:{enable:function(){document.body.classList.add("square-avatars")},disable:function(){document.body.classList.remove("square-avatars")}},noMemberlistAvatars:{enable:function(){document.body.classList.add("no-memberlist-avatars")},disable:function(){document.body.classList.remove("no-memberlist-avatars")}},fixFolderColorPicker:{enable:function(){document.body.classList.add("fix-folder-color-picker")},disable:function(){document.body.classList.remove("fix-folder-color-picker")}}},goosemodScope.enableTweak=function(e){t[e].enable(),goosemodScope.tweaks[e]=!0},goosemodScope.disableTweak=function(e){t[e].disable(),goosemodScope.tweaks[e]=!1},goosemodScope.setTweak=function(e,o){!0===o?goosemodScope.enableTweak(e):goosemodScope.disableTweak(e)};case 15:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),onLoadingFinished:function(){var e=i(regeneratorRuntime.mark(function e(){var o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(o in goosemodScope.tweaks)!0===goosemodScope.tweaks[o]&&goosemodScope.enableTweak(o);goosemodScope.settings.createItem("Visual Tweaks",["(v".concat(u,")"),{type:"header",text:"Individual Minor Tweaks"},{type:"toggle",text:"Hide Help Button",subtext:"Hides the help button in the top right corner",onToggle:function(e){goosemodScope.setTweak("removeHelpButton",e)},isToggled:function(){return goosemodScope.tweaks.removeHelpButton}},{type:"toggle",text:"Disable Emoji Click Pop-up",subtext:"Disables the pop-up when clicking emojis",onToggle:function(e){goosemodScope.setTweak("removeEmojiUpsell",e)},isToggled:function(){return goosemodScope.tweaks.removeEmojiUpsell}},{type:"toggle",text:"Square Avatars",subtext:"Makes avatars for messages square instead of circle (cozy only)",onToggle:function(e){goosemodScope.setTweak("squareAvatars",e)},isToggled:function(){return goosemodScope.tweaks.squareAvatars}},{type:"toggle",text:"[WIP] No Member List Avatars",subtext:"Hides avatars in the member list",onToggle:function(e){goosemodScope.setTweak("noMemberlistAvatars",e)},isToggled:function(){return goosemodScope.tweaks.noMemberlistAvatars}},{type:"toggle",text:"Fix Folder Color Picker",subtext:"Fixes the folder color picker being misaligned.",onToggle:function(e){goosemodScope.setTweak("fixFolderColorPicker",e)},isToggled:function(){return goosemodScope.tweaks.fixFolderColorPicker}}]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),onRemove:function(){var e=i(regeneratorRuntime.mark(function e(){var o,t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(o in goosemodScope.tweaks)!0===goosemodScope.tweaks[o]&&goosemodScope.disableTweak(o);t=goosemodScope.settings.items.find(function(e){return"Visual Tweaks"===e[1]}),goosemodScope.settings.items.splice(goosemodScope.settings.items.indexOf(t),1);case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),getSettings:function(){var e=i(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[goosemodScope.tweaks]);case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),loadSettings:function(){var o=i(regeneratorRuntime.mark(function o(t){var n,r,s;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:for(s in n=e(t,1),r=n[0],goosemodScope.tweaks=r,goosemodScope.tweaks)try{goosemodScope.setTweak(s,goosemodScope.tweaks[s])}catch(a){console.log(a)}case 3:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}(),logRegionColor:"darkred"}};exports.default=c;
|
|
},{}]},{},["index.js"], null);parcelRequire('index.js').default |