You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
Plugins will be folders placed in the /plugins/user/ (with official plugins in /plugins/official/).
Each plugin consists of a .meta file which contains information about the plugin, and at least one of browser.js and notification.js files, which contain the actual script that is ran either in the browser or notification window.
Browser plugins have access to the full library set of TweetDeck (such as jQuery or TD's custom front-end functions), notification plugins can only use vanilla JS. All plugins have access to global variables, including $TD for communication with the C# end.
Here is a rough base of a plugin. All overridden functions except for constructor are empty and do not require a super call.
.meta
[name]
Example Plugin
[description]
This is an example plugin.
It does stuff.
[author]
chylex
[version]
1.0
[requires]
1.2.3
(only name tag is required; the value of requires defaults to wildcard (*) but the program will not load the plugin if an invalid version is provided)
browser.js
constructor(){
super({
requiresPageReload: true // reloads page when manually enabled or disabled
});
}
enabled(){
// prepare variables, modify global variables, update stylesheets
}
ready(){
// modify the contents as the page has finished loading, add event listeners
}
disabled(){
// remove event listeners and revert everything to original state
}
notification.js
constructor(){
super({
// currently no options
});
}
run(){
// setup everything, ran for every notification
}
This is a very basic plugin system that will be expanded in the future if there is any interest in it. Ideas and feedback appreciated.
The text was updated successfully, but these errors were encountered:
Plugins will be folders placed in the /plugins/user/ (with official plugins in /plugins/official/).
Each plugin consists of a .meta file which contains information about the plugin, and at least one of browser.js and notification.js files, which contain the actual script that is ran either in the browser or notification window.
Browser plugins have access to the full library set of TweetDeck (such as jQuery or TD's custom front-end functions), notification plugins can only use vanilla JS. All plugins have access to global variables, including $TD for communication with the C# end.
Here is a rough base of a plugin. All overridden functions except for constructor are empty and do not require a super call.
.meta
(only name tag is required; the value of requires defaults to wildcard (*) but the program will not load the plugin if an invalid version is provided)
browser.js
notification.js
This is a very basic plugin system that will be expanded in the future if there is any interest in it. Ideas and feedback appreciated.
The text was updated successfully, but these errors were encountered: