diff --git a/README.md b/README.md index 0b99b44..ae54cd9 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,30 @@ # SillyTavern Extension Example -Provide a brief description of how your extension works, what problem it aims to solve. +*Provide a brief description of how your extension works, what problem it aims to solve.* ## Features -Describe some of the main selling points of your extension. +*Describe some of the main selling points of your extension.* ## Installation and Usage ### Installation -In most cases, this should just be using ST's inbuilt extension installer. +*In most cases, this should just be using ST's inbuilt extension installer.* ### Usage -Explain how to use this extension. +*Explain how to use this extension.* ## Prerequisites -Specify the version of ST necessary here. +*Specify the version of ST necessary here.* ## Support and Contributions -Where should someone ask for support? -How can they help add to this extension? +*Where should someone ask for support?* +*How can they help add to this extension?* ## License -Be cool, use an open source license. \ No newline at end of file +*Be cool, use an open source license.* \ No newline at end of file diff --git a/index.js b/index.js index c2fe78c..64307db 100644 --- a/index.js +++ b/index.js @@ -9,27 +9,24 @@ const extensionName = "example-extension"; const extensionFolderPath = `scripts/extensions/third-party/${extensionName}/`; const extensionSettings = extension_settings[extensionName]; - function onButtonClick() { - // This function is called when the button is clicked - // You can do whatever you want here + // This function is called when the button is clicked + // You can do whatever you want here } // This function is called when the extension is loaded jQuery(async () => { - // This is an example of loading HTML from a file - const settingsHtml = await $.get( - `${extensionFolderPath}/example.html` - ); + // This is an example of loading HTML from a file + const settingsHtml = await $.get(`${extensionFolderPath}/example.html`); - // Append settingsHtml to extensions_settings - // extension_settings and extensions_settings2 are the left and right columns of the settings menu - // You can append to either one - $("#extensions_settings").append(settingsHtml); + // Append settingsHtml to extensions_settings + // extension_settings and extensions_settings2 are the left and right columns of the settings menu + // You can append to either one + $("#extensions_settings").append(settingsHtml); - // These are examples of listening for events - $("#my_button").on("click", onButtonClick()); + // These are examples of listening for events + $("#my_button").on("click", onButtonClick()); - // Load settings when starting things up (if you have any) - loadSettings(); + // Load settings when starting things up (if you have any) + loadSettings(); });