haicord/src/plugins/experiments.ts

22 lines
603 B
TypeScript
Raw Normal View History

2022-10-01 02:27:28 +02:00
import { Devs } from "../utils/constants";
import definePlugin from "../utils/types";
2022-08-29 22:05:22 +02:00
export default definePlugin({
name: "Experiments",
2022-10-01 02:27:28 +02:00
authors: [Devs.Ven, Devs.Megu],
2022-08-29 22:05:22 +02:00
description: "Enable Experiments",
patches: [{
find: "Object.defineProperties(this,{isDeveloper",
replacement: {
match: /(?<={isDeveloper:\{[^}]+,get:function\(\)\{return )\w/,
replace: "true"
}
}, {
2022-09-27 18:08:11 +02:00
find: 'type:"user",revision',
replacement: {
match: /(\w)\|\|"CONNECTION_OPEN".+?;/g,
replace: "$1=!0;"
}
2022-08-29 22:05:22 +02:00
}]
});