Advertisement
Guest User

Untitled

a guest
Jan 29th, 2022
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. /* jshint undef: true, unused: false */
  2. /* global API,UI,PluginHandler */
  3. var self = this;
  4. this.plugin = {
  5. session_id: "abc",
  6. PreInit: function () {
  7. //Called prior to the plugins initialisation, before the tabs are loaded.
  8. //This method must not invoke any module/plugin specific API calls.
  9. },
  10.  
  11. PostInit: function () {
  12. //The tabs have been loaded. You should wire up any event handlers here.
  13. //You can use module/specific API calls here.
  14. $("#sync").click(Sync);
  15. },
  16.  
  17. Reset: function () {
  18. //Tear everything down. Ideally it should be possible to continually do
  19. //PreInit -> PostInit -> Reset -> PreInit -> PostInit... over and over.
  20. },
  21.  
  22. StartupFailure: function () {
  23. //Gets called when the application fails to start. Mainly for Modules rather than plugins.
  24. },
  25.  
  26. SettingChanged: function (node, value) {
  27. //Invoked whenever a setting is changed. Only applies to changes in the current session rather
  28. //than made by other users.
  29. },
  30.  
  31. AMPDataLoaded: function () {
  32. //Any data you might need has been loaded, you should wire up event handlers which use data such as settings here.
  33.  
  34.  
  35.  
  36. },
  37.  
  38. PushedMessage: function (message, data)
  39. {
  40. //Invoked when your associated plugin invokes IPluginMessagePusher.Push(message, data) - you only recieve messages pushed
  41. //from your plugin and not from other plugins/modules.
  42. }
  43.  
  44. };
  45.  
  46. this.tabs = [
  47. {
  48. File: "VMS.php", //URL to fetch the tab contents from. Relative to the plugin WebRoot directory.
  49. ExternalTab: false, //If True, 'File' is treated as an absolute URL to allow contents to be loaded from elsewhere.
  50. //Note that the appropriate CORS headers are required on the hosting server to allow this.
  51. ShortName: "VMS", //Name used for the element. Prefixed with tab_PLUGINNAME_
  52. Name: "Valheim Mod Sync", //Display name for the tab.
  53. Icon: "icon.jpg", //Icon to show in the tab.
  54. Light: false, //Use the 'light' theme for this tab.
  55. Category: ""
  56. }
  57. ];
  58.  
  59. this.stylesheet = ""; //Styles for tab-specific styles
  60. //Put your code here.
  61.  
  62. function sync(){
  63. console.log("sync")
  64.  
  65.  
  66.  
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement