aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/isStaff.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/plugins/isStaff.ts b/src/plugins/isStaff.ts
new file mode 100644
index 0000000..aacfc4d
--- /dev/null
+++ b/src/plugins/isStaff.ts
@@ -0,0 +1,28 @@
+import { Devs } from "../utils/constants";
+import definePlugin from "../utils/types";
+
+export default definePlugin({
+ name: "isStaff",
+ description:
+ "Gives access to client devtools & other things locked behind isStaff",
+ authors: [Devs.Megu],
+ patches: [
+ {
+ find: ".isStaff=function(){",
+ replacement: [
+ {
+ match: /(\w+)\.isStaff=function\(\){return\s*!1};/,
+ replace: "$1.isStaff=function(){return true};",
+ },
+ {
+ match: /return\s*\w+\.hasFlag\(.+?STAFF\)}/,
+ replace: "return true}",
+ },
+ {
+ match: /hasFreePremium=function\(\){return this.isStaff\(\)\s*\|\|/,
+ replace: "hasFreePremium=function(){return ",
+ },
+ ],
+ },
+ ],
+});