Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (45 sloc) 1.68 KB

Contributing

Thanks for offering your help! Here's how you contribute:

  1. Fork the repository
  2. Do your work in that fork
  3. Submit a pull request

After you submit a pull request, we will review it and suggest changes and improvements. Then, we'll merge it into our repository and the changes will immediately go live.

The easiest way to find work to do is by looking at the pr-wanted label. If you start working on something, comment on the issue so other contributors can know someone is already working on it.

## DOs and DON'Ts

Follow these guidelines to contribute to MediaCrush.

DO

  • Add documentation for things that seem odd to you
  • Install a copy of MediaCrush locally
  • Test changes (especially ones to the backend) on your local copy
  • Add unit tests

DON'T

  • Add dependencies without checking with the maintainers (through GitHub issues or IRC)

Coding Standards

We have a few standards, though. Make sure you write your code like this.

  • Four spaces, not tabs
  • Spaces between mathematical operators: 2 + 4 / (10 - 4)

Python

@app.before_request
def find_dnt():
    field = "Dnt"
    do_not_track = False
    if field in request.headers:
        do_not_track = True if request.headers[field] == "1" else False

    g.do_not_track = do_not_track

JavaScript

function fooBar() {
    var example = 1234;
    registerThing(function(e) {
        // Do stuff
    }, false);
    bar(1, 2, 3);
}

CSS

.foo .bar {
    example: 1 2 3;
    -moz-foobar: 1234;
    -webkit-foobar: 1234;
    foobar: 1234;
}