A user script for drupal.org. Improves the user experience and functionality for Drupal contributors and power users.
This is a user script, not a Drupal module. User scripts are installed in your browser, not in Drupal.
Requirements
- Browser support for user scripts.
(Natively supported in Chrome and Opera.- For Firefox, install the GreaseMonkey extension.
- For Safari, install the NinjaKit extension.
Installation
- Click to Install or Update
(or follow the link to the raw script and look for an installation prompt)- In Chrome 21 and later, download the file, go to
chrome://extensions, and drag the newly downloaded file to install it. (visual instructions) (issue) - For Opera, follow these instructions.
- In Chrome 21 and later, download the file, go to
WTF?
Dreditor (short of Drupal editor
, pronounced /'dɹɛdɪtə/) started as simple idea for a (greasemonkey) browser user script to help module maintainers, Drupal core maintainers, and developers in general to review patches on http://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.
Applications
- 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.
- Select lines in the diff to enter a patch review comment. Select further lines if the same comment pertains to other lines as well. Press "Save" to store a comment.
- Click on existing selections to edit a comment or select further lines. Press "Delete" to delete an existing comment.
- Press "Hide deletions" to only see the final resulting lines; useful to remove noise when reviewing complex code logic.
- Press "Hide" to temporarily read the issue, retaining your patch review comments.
- Press "Paste" to insert all comments including selected lines into the issue.
- Use the jump menu in the sidebar to quickly jump to individual files or hunks in files.
- Autocompletion
- 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.
- HTML: Type
<ulto get<ul></ul>,<blockto get<blockquote></blockquote>, etc. - Usernames: Type
@sto get@sun,@slto get@slantview, etc. Only usernames contained on the current page are available. - Issue URLs: Paste
http://drupal.org/node/123456and hit TAB to get[#123456]. - Comment #IDs: Type
#42and hit TAB to convert it into a link to the corresponding issue comment.#0links to the OP.
- HTML: Type
- 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:
- Firefox: dragdropupload
- Chrome: drag2up
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, or the Stylish add-on for Firefox, or a browser that natively supports user styles.
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.
Credits
Author and current maintainer:
This project has been sponsored by:
- unleashed mind
- Drupal developer monsters.
Downloads
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Utility
- Downloads: 392
- Last modified: January 4, 2013
