https://github.com/swader/trelloui
https://github.com/swader/trelloui
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/swader/trelloui
- Owner: Swader
- License: other
- Created: 2014-12-21T12:09:08.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-21T12:15:07.000Z (over 11 years ago)
- Last Synced: 2025-06-02T04:53:56.027Z (about 1 year ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TrelloUI Helper Lib v0.0.1
A helper library for extending Trello's UI. You'll have little use for it outside browser extension development.
Currently extremely rudimentary, built for tutorial on SitePoint.com/javascript.
## Functionality and Usage
Currently, the library merely dispatches an event when the #board element has loaded, and/or the .list elements have appeared. This allows you to attach events and UI mods on those elements reliably - Trello's UI is very ajaxy and as such often emits a page ready event before the elements have loaded. This helper library makes that problem go away (for the most part).
To use it, download [this file](src/trelloui.js), include it in your project and then attach listeners for either (or all) of the following events:
- trelloui-boardready
- trelloui-listsready
like so:
```
document.addEventListener('trelloui-boardready', function() {
console.log("Board is ready!");
});
```
## Contributions
Contributions are welcome - send me your pull requests and I'll take a look at them ASAP. The only rule is: no frameworks. No Angular, no Ember, none of that nonsense. The only allowed third party resource is jQuery, and that's just because Trello's JS client requires it.
Performance is king - if you need to sacrifice code verbosity or DRY principles for performance gains, do it - I'd rather use 1% less CPU than have fully reusable components.
I won't be writing tests because I hate writing JavaScript, but if you want to and know how, feel free, I'll be very grateful.
## License
See [LICENSE](LICENSE.md).
## Todo
- remove jQuery dependency (low priority - the Trello client needs it anyway)
- optimize the interval checker (sometimes uses more CPU than I'd like it to)
- add more events (menusready, avatarsready...?)