Download the Chrome extension

GitHub repository

About

Dreditor (short for "Drupal editor" and pronounced /'dɹɛdɪtə/) started as a simple idea for a (greasemonkey) browser user script to help module maintainers, Drupal core maintainers, and developers in general to review patches on https://www.drupal.org.

Dreditor provides multiple applications/helpers for drupal.org and implements a concept of applications/namespaces/modules. The user script can re-use all available data on drupal.org as well as common Drupal development practices.

See also

If you like this project, you may also like:

drupal.org unleashed user style A user style for advanced drupal.org users. Requires Greasemonkey.

APIs and helpers

Dreditor additionally contains the following noteworthy components and sub-systems:

jQuery.debug() Allows to debug and inspect arbitrary data/variables in Firebug's console, but also to access them again in the global window object (optionally using a named identifier, e.g. window.debug.myValue). Chainable via jQuery. Especially useful for re-accessing and debugging selected data via Firebug's console. (now also available via admin_devel module)

jQuery Form API Initial stab at building, processing, and rendering jQuery-enabled forms in a JS-only environment. Supports multiple form submit handlers. To be continued.

Any issues with Dreditor, or do you want a new feature? Let us know here.

Manual Installation

  1. Install Node.js - ensure to install the bundled Node Package Manager npm, too.
  2. Install [Grunt] by running the following shell command: npm install -g grunt-cli
  3. Confirm that the Grunt CLI is installed and works: grunt --version
  4. Clone the Dreditor repository: git clone https://github.com/dreditor/dreditor.git
  5. Change into the new repository directory and install all dependencies: cd dreditor, npm install, grunt install
  6. Start a first Dreditor build by running: grunt
  7. Go to chrome://extensions
  8. Enable Developer mode
  9. Click on Load unpacked extension...
  10. Browse to the /build/chrome directory and click Select
  11. Manually refresh the extensions page after each code change

Features

Patch reviewer

Injects a "Review" button for all .patch file attachments on drupal.org. Opens the patch file with diff syntax highlighting (removed/added/control lines) and minimal PHP syntax highlighting (comments), and allows to comment on it.

Auto-completion

Pressing the TAB key after certain character sequences automatically completes or converts the entered characters into a full string, and moves the cursor to the next best input position.

Commit message generator

Scans an issue for the top contributors and generates a template that follows the documented best practice for commit messages. Also allows to select the primary contributor for proper git author attribution.

Image attachment embedder

Injects an "Embed" button for image attachments to quickly insert uploaded screenshots into an issue follow-up.

Recommended browser extensions to speed up uploading of file attachments:

Contributing

Dreditor is powered by native JavaScript code. Simple.

The development process is powered by Node.js and Grunt. Sounds complex, but is trivial!

Setting up a local development environment just takes a few minutes; it's all automated.

Check the Contributing page to learn more.

Maintainers

Original author: Daniel F. Kudwien (sun).