hometown/app/javascript/mastodon/utils
ThibG d8d43a427a
Fix image uploads being random data when canvas read access is blocked (#15180)
Fixes #15178

PR #11499 introduced a way to deal with all-white canvas, but newer
Firefox versions set random data instead.

This PR detects whether canvas operations are reliable by comparing
the results on a hardcoded 2×2 pixels image, and memoizing the result.

This should be both more reliable and faster than the previous check.
2020-11-18 18:01:58 +01:00
..
__tests__ Add comment, test to unescapeHTML (#7949) 2018-07-05 19:19:38 +09:00
base64.js Refactor resizeImage method (#7236) 2018-04-23 09:15:51 +02:00
config.js Change how CDN_HOST is passed down to make assets build reproducible (#14381) 2020-10-13 01:19:35 +02:00
html.js Add comment, test to unescapeHTML (#7949) 2018-07-05 19:19:38 +09:00
log_out.js Migrate Rails ujs as required for Rails 6 Upgrade. (#13280) 2020-03-21 03:14:50 +01:00
notifications.js Fix browser notification permission request logic (#13543) 2020-10-13 00:37:21 +02:00
numbers.js Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
resize_image.js Fix image uploads being random data when canvas read access is blocked (#15180) 2020-11-18 18:01:58 +01:00
scrollbar.js Do not add margin light when opening modal on mobile (#11830) 2019-09-29 14:30:58 +02:00