Last active
April 6, 2026 18:33
-
-
Save mininmobile/aff422d0784e78a13e167b8627633629 to your computer and use it in GitHub Desktop.
Revisions
-
mininmobile revised this gist
Nov 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Example { } // Load/Unload load() { } unload() { } -
mininmobile revised this gist
Nov 12, 2017 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,10 +23,6 @@ class Example { unload() { } // Events onMessage() { @@ -44,13 +40,17 @@ class Example { // Start/Stop start() { var libraryScript = document.getElementById('zeresLibraryScript'); if (!libraryScript) { libraryScript = document.createElement("script"); libraryScript.setAttribute("type", "text/javascript"); libraryScript.setAttribute("src", "https://rauenzi.github.io/BetterDiscordAddons/Plugins/PluginLibrary.js"); libraryScript.setAttribute("id", "zeresLibraryScript"); document.head.appendChild(libraryScript); } if (typeof window.ZeresLibrary !== "undefined") this.initialize(); else libraryScript.addEventListener("load", () => { this.initialize(); }); } stop() { PluginUtilities.showToast(this.getName() + " " + this.getVersion() + " has stopped."); -
mininmobile created this gist
Nov 12, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ //META{"name":"Example"}*// class Example { // Constructor constructor() { this.initialized = false; } // Meta getName() { return "Example"; } getShortName() { return "Example"; } getDescription() { return "This is an example/template for a BD plugin."; } getVersion() { return "0.1.0"; } getAuthor() { return "Minin"; } // Settings Panel getSettingsPanel() { return "<!--Enter Settings Panel Options, just standard HTML-->"; } // Load/Unload load() { } unload() { } if (typeof window.ZeresLibrary !== "undefined") this.initialize(); else libraryScript.addEventListener("load", () => { this.initialize(); }); } // Events onMessage() { // Called when a message is received }; onSwitch() { // Called when a server or channel is switched }; observer(e) { // raw MutationObserver event for each mutation }; // Start/Stop start() { var libraryScript = document.getElementById('zeresLibraryScript'); if (!libraryScript) { libraryScript = document.createElement("script"); libraryScript.setAttribute("type", "text/javascript"); libraryScript.setAttribute("src", "https://rauenzi.github.io/BetterDiscordAddons/Plugins/PluginLibrary.js"); libraryScript.setAttribute("id", "zeresLibraryScript"); document.head.appendChild(libraryScript); } stop() { PluginUtilities.showToast(this.getName() + " " + this.getVersion() + " has stopped."); }; // Initialize initialize() { this.initialized = true; PluginUtilities.showToast(this.getName() + " " + this.getVersion() + " has started."); } }