jonrohan/ZeroClipboard — pull request #66 by jonrohan (2013-01-07 01:03:22+00:00)
Title: Overhauling the options

The current way ZeroClipboard handles options is all over the place. Some are setter functions, some are .properties. And there isn't even defaults.

So I want to fix that. This pull request overhauls how we handle options. I'll go through what changed.

First there are _defaults that zeroclipboard will use as fallback.

```js
var _defaults = {
moviePath: "ZeroClipboard.swf", // URL to movie
trustedDomain: undefined, // Domains that we should trust
hoverClass: "zeroclipboard-is-hover", // The class used to hover over the object
activeClass: "zeroclipboard-is-active" // The class used to set object active
};
```

These are only accessible by ZeroClipboard, and used only once when creating a new client.

You can override these defaults using `ZeroClipboard.setDefaults({...});` You can pass setDefaults a json object containing properties you want to override.

When creating a client you can pass in options that you want to use for example.

```js
var clip = new ZeroClipboard.Client( $("#d_clip_button"), {
hoverClass: "is-hover"
});
```

While doing these changes I also removed old setters. The following are gone.

```js
ZeroClipboard.Client.prototype.resetText
ZeroClipboard.setMoviePath
ZeroClipboard.setTrustedDomains
```

cc @JamesMGreene