experiments: change toolbar help button -> dev menu
This commit is contained in:
parent
e5e8b9ba01
commit
b88be8014e
2 changed files with 17 additions and 0 deletions
3
src/plugins/experiments/hideBugReport.css
Normal file
3
src/plugins/experiments/hideBugReport.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
#staff-help-popout-staff-help-bug-reporter {
|
||||
display: none;
|
||||
}
|
|
@ -16,6 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { ErrorCard } from "@components/ErrorCard";
|
||||
import { Devs } from "@utils/constants";
|
||||
|
@ -24,6 +25,8 @@ import definePlugin from "@utils/types";
|
|||
import { findByPropsLazy } from "@webpack";
|
||||
import { Forms, React } from "@webpack/common";
|
||||
|
||||
import hideBugReport from "./hideBugReport.css?managed";
|
||||
|
||||
const KbdStyles = findByPropsLazy("key", "removeBuildOverride");
|
||||
|
||||
export default definePlugin({
|
||||
|
@ -58,9 +61,20 @@ export default definePlugin({
|
|||
match: 'title:"Experiments",children:[',
|
||||
replace: "$&$self.WarningCard(),"
|
||||
}
|
||||
},
|
||||
// change top right chat toolbar button from the help one to the dev one
|
||||
{
|
||||
find: "toolbar:function",
|
||||
replacement: {
|
||||
match: /\i\.isStaff\(\)/,
|
||||
replace: "true"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
start: () => enableStyle(hideBugReport),
|
||||
stop: () => disableStyle(hideBugReport),
|
||||
|
||||
settingsAboutComponent: () => {
|
||||
const isMacOS = navigator.platform.includes("Mac");
|
||||
const modKey = isMacOS ? "cmd" : "ctrl";
|
||||
|
|
Loading…
Reference in a new issue