1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 10:16:09 +02:00
Files
php-flarum/js/src/common
J.C.Ködel 2dedfe4b92 Fix Color Thief cross origin bug
When users have external avatar urls (for instance: in a SSO environment where the avatar is provided by another domain), color thief fails to get the avatar dominant color because the canvas would be tainted. 

Following the instructions here (https://lokeshdhakar.com/projects/color-thief/ on the "Does it work if the image is hosted on another domain?"), adding an `image.crossOrigin = 'Anonymous';` solves the issue.

Tested on my forum which before suffered from a JS error and works fine (without this fix, the canvas remain in the `body` while an script error is thrown by color thief)
2019-10-28 16:35:45 +01:00
..
2018-08-24 22:13:05 +09:30
2019-10-28 16:35:45 +01:00
2019-09-05 02:17:09 +02:00
2018-06-20 13:20:31 +09:30
2018-06-20 13:20:31 +09:30
2018-06-20 13:20:31 +09:30
2018-08-14 21:46:53 +02:00
2018-06-30 12:31:12 +09:30