-
Notifications
You must be signed in to change notification settings - Fork 40
Home
Welcome to the reddit-moderator-toolbox wiki!
User documentation can be found on the /r/toolbox subreddit and subreddit wiki. This GitHub wiki is aimed at people looking to contribute code to toolbox.
Thinking about contributing to toolbox? Awesome! Here is some information to get you started!
We ask that you first make a post in the /r/toolbox subreddit before submitting an issue here. This in order to keep clutter out of the issues on github as much as possible.
New contributions to toolbox are always welcome, there are some guidelines we ask you to follow.
Since toolbox is a project that receives contributions from multiple people from various programming backgrounds it is important to be aware of style conventions. Our programming style guidelines aim is to make it easier for someone who starts work on toolbox to familiarize themselves with the style conventions agreed upon in toolbox.
The document can be found here in our wiki.
We welcome new functionality, however it is always possible that someone is already working on something you have thought up or that we have not implemented something deliberately. So if you are considering coding new functionality it is always a good idea to first check. Either on irc or by making an issue about it on github.
We have a lot of utility functions in toolbox ready to be used for background operations as well as interface building. So when you need a specific sort of function make sure to check if it does not already exist. This is even more important when dealing with reddit DOM manipulation and information scraping. Reddit has the habbit of presenting data in a multitude of different ways depending on the location and the time of the month, a lot of the functionality in our utility code has been refined over the years to account for that.
You can find the documentation for all this on the following locations
- TBUtils contains the main bulk of the utility functions.
- TBui takes care of most of our interface needs.
- Toolbox module documentation details how the general toolbox module structure works.
-
/
: root directory containing scripting for building toolbox and configuration for development related things (linting, git configuration files). -
edgeAssets/
: Assets used specifically during the Edge build process. -
extension/
: root directory of the extension itself. Contains the manifests. From here the unpacked extension can be loaded for development. -
extension/data/
: Directory containing the functional code of toolbox. All files starting withtb
are toolbox core scripts. -
extension/data/tbmodule.js
: Modules are loaded into toolbox through this. -
extension/data/tbstorage.js
: Everything storage related. -
extension/data/tbui.js
: Handles creating UI elements, wiki page. -
extension/data/tbutils.js
: TBUtils is one of the core blocks on which toolbox is build. It contains most of functions used to interact with reddit. Wiki page. -
extension/data/background/
: Contains extension background scripts -
extension/data/images/
: Images used by toolbox. -
extension/data/libs/
: Contains javascript libraries used by toolbox -
extension/data/modules/
: Contains the individual toolbox modules. -
extension/data/styles/
: Contains all CSS
- Go to
Menu->Tools->Extensions
and tick theDeveloper Mode
checkbox. - Click
Load unpacked extension
and select the/extension
folder. - Any time you make changes, you must go back to the
Menu->Tools->Extensions
page andReload
the extension.
- Go to
about:flags
and tick theEnable extension developer features
checkbox. - Click
Load extension
on the extensions menu and select the/extension
. - Any time you make changes, you must go back to the
Menu->Extensions
page, go to the extension's settings andReload
the extension.
- Go to
about:debugging
and tick theEnable add-on debugging
checkbox. - Click
Load Temporary Add-on
and select/extension
/manifest.json`. - Any time you make changes, you must go back to the
about:debugging
page andReload
the extension.