Skip to content

Commit 9bec23a

Browse files
committed
Squashed commit of the following:
commit afdd585db0e502c5513f2250563756ffa55253c3 Author: Brian Gonzalez <[email protected]> Date: Sun Dec 15 15:12:35 2013 -0800 issue briangonzalez#6 - cleaned up readme
1 parent 6109809 commit 9bec23a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,23 @@ Caveats
6464
--------------
6565
This plugin utlizes the `<canvas>` element and the `ImageData` object, and due to cross-site security limitations, the script will fail if one tries to extract the colors from an image not hosted on the current domain, *unless* the image allows for [Cross Origin Resource Sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing).
6666

67-
To enable CORS for images hosted on S3 buckets follow the Amazon guide [here](http://docs.aws.amazon.com/AmazonS3/latest/UG/EditingBucketPermissions.html); adding the folloing to the buckets CORS configuration
67+
To enable CORS for images hosted on S3 buckets, follow the Amazon guide [here](http://docs.aws.amazon.com/AmazonS3/latest/UG/EditingBucketPermissions.html); adding the following to the bucket's CORS configuration:
68+
6869
```xml
6970
<CORSRule>
7071
<AllowedOrigin>*</AllowedOrigin>
7172
<AllowedMethod>GET</AllowedMethod>
7273
</CORSRule>
7374
```
7475

75-
For all images you should also include a cross-origin attribute in your image
76+
For all images, you can optionally also include a cross-origin attribute in your image. This is not absolutely necessary since the `anonymous` origin is set in the Javascript code.
77+
7678
```html
77-
<img src="/image.jpg" data-adaptive-background='1' cross-origin="anonymous" />
79+
<img src="/image.jpg" data-adaptive-background='1' cross-origin="anonymous"/>
7880
```
7981

82+
Credit
83+
------
8084
This plugin is built on top of a script called [RGBaster](https://github.com/briangonzalez/rgbaster.js).
8185

8286
Author

0 commit comments

Comments
 (0)