mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-27 23:44:25 -04:00
More Plugins
This commit is contained in:
parent
b4587182c2
commit
167612920b
14 changed files with 1605 additions and 3 deletions
|
@ -16,20 +16,32 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
maxAccounts: {
|
||||
description: "Number of accounts that can be added, or 0 for no limit",
|
||||
default: 0,
|
||||
type: OptionType.NUMBER,
|
||||
restartNeeded: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
name: "UnlimitedAccounts",
|
||||
description: "Increases the amount of accounts you can add.",
|
||||
authors: [EquicordDevs.Balaclava, EquicordDevs.thororen],
|
||||
settings,
|
||||
patches: [
|
||||
{
|
||||
find: "multiaccount_cta_tooltip_seen",
|
||||
replacement: {
|
||||
match: /(let \i=)\d+(,\i="switch-accounts-modal",\i="multiaccount_cta_tooltip_seen")/,
|
||||
replace: "$1Infinity$2",
|
||||
replace: "$1$self.getMaxAccounts()$2",
|
||||
},
|
||||
},
|
||||
],
|
||||
getMaxAccounts() { return settings.store.maxAccounts === 0 ? Infinity : settings.store.maxAccounts; },
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue