Experiments: add playground embed support (#713)

This commit is contained in:
prism 2026-02-01 04:40:13 +01:00 • committed by GitHub
parent 6e2bb1ea90
commit 24e41cb6a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,6 +116,16 @@ export default definePlugin({
match: /}getServerAssignment\((\i),\i,\i\){/,
replace: "$&if($1==null)return;"
}
},
// Enable playground embed on sent playground links
// dev://playground/mana, dev://playground/payments, dev://playground/virtual-currency,
// dev://playground/nitro, dev://playground/mfa, dev://playground/cms, dev://playground/void
{
find: "{PlaygroundEmbed:()=>",
replacement: {
match: /getCurrentUser\(\);return\(null==\i\?void 0:\i\.isStaff\(\)\)/,
replace: "getCurrentUser();return(true"
}
}
],