Dreditor
Awesome user scripts for drupal.org going on here. This is no Drupal module, and you can only install the script in your browser.
Use the issue queue for patches. Use IRC for discussion.
Dependencies
- GreaseMonkey extension for Firefox or a GreaseMonkey-compatible browser.
Installation
WTF?
Dreditor 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. During development, it quickly became apparent that
a) Dreditor can provide multiple applications/helpers for drupal.org and thereby implements a concept of applications/namespaces/modules
b) the user script can re-use all available data on drupal.org as well as common Drupal development practices, and thereby also contains an initial effort to "port" Form API to JavaScript and other, crazy stuff
c) since the user script entirely depends on Drupal and jQuery, it might be turned into a real Drupal module at any time.
Applications
- Patch reviewer
- Injects a "Review" button to all .patch file attachments on drupal.org. Parses the entire patch file into HTML to provide diff syntax highlighting (diff control lines, removed lines, added lines) and a jump menu in a sidebar to quickly jump to individual files or hunks in files. Selecting lines in the diff allows to enter a patch review comment, which may span over multiple selections. Review comments are editable and selections can be extended. A "Paste" button allows to insert all review comments along with the corresponding, remarked patch file lines into the issue comment textarea, nicely providing contextual information for pasted code lines.
- Commit message generator
- Scans an issue for the top contributors and generates a commit message out of them.
- Image attachment embedder
- Injects an "Embed" button to image attachments to quickly insert uploaded screenshots into an issue follow-up.
Recommended Firefox extension to further speed up file attachments: DragDropUpload.
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. - 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.
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.
