Skip to content

Instantly share code, notes, and snippets.

@marcustyphoon
Created August 22, 2020 19:40
Show Gist options
  • Save marcustyphoon/cc1510993f4103cd677cfe2d96cf9ac5 to your computer and use it in GitHub Desktop.
Save marcustyphoon/cc1510993f4103cd677cfe2d96cf9ac5 to your computer and use it in GitHub Desktop.
//* TITLE test_sidebar **//
//* VERSION 1.0.0 **//
//* DESCRIPTION **//
//* DEVELOPER New-XKit **//
//* FRAME false **//
//* BETA true **//
XKit.extensions.test_sidebar = new Object({
running: false,
run: async function() {
this.running = true;
await XKit.interface.react.sidebar.add({
id: "testsidebar_sidebar",
title: "Test React Sidebar",
items: [
{ id: "testsidebar_button", text: "a button", count: 5 },
{ id: "testsidebar_button1", text: "another button", count: 5 },
{ id: "testsidebar_button2", text: "yet another button but it's really really long", carrot: true },
{ id: "testsidebar_button3", text: "buttons galore" },
{ id: "testsidebar_button4", text: "this one can be broken, it's okay", carrot: true, count: 5 }
],
small: [
{ id: "testsidebar_button-mode", text: `Mode: ksgskshd` },
{ id: "testsidebar_button-mode-change", text: "hsdah" }
]
});
XKit.interface.sidebar.add({
id: "testsidebar_legacysidebar",
title: "Test Legacy Sidebar",
items: [
{ id: "testsidebar_button", text: "a button", count: 5 },
{ id: "testsidebar_button1", text: "another button", count: 5 },
{ id: "testsidebar_button2", text: "yet another button but it's really really long", carrot: true },
{ id: "testsidebar_button3", text: "buttons galore" },
{ id: "testsidebar_button4", text: "this one can be broken, it's okay", carrot: true, count: 5 }
],
small: [
{ id: "testsidebar_button-mode", text: `Mode: ksgskshd` },
{ id: "testsidebar_button-mode-change", text: "hsdah" }
]
});
},
destroy: function() {
this.running = false;
XKit.interface.react.sidebar.remove("testsidebar_sidebar");
XKit.interface.react.sidebar.remove("testsidebar_legacysidebar");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment