martok / palefill

Inject Polyfills for various web technologies into pages requiring them
https://martok.github.io/palefill/
Mozilla Public License 2.0
79 stars 9 forks source link

Palefill 1.21 stopped working on SeaMonkey (nonce CSP fix) #48

Closed dilworks closed 1 year ago

dilworks commented 1 year ago

Hi there!

Just updated Palefill to 1.21 here to notice that it does absolutely nothing at all on SeaMonkey! At first I thought it was something deprecated/broke with its latest update (as 2.53.14 got released two days ago), but managed to replicate it on a clean profile on a machine that hasn't been updated yet. Downgrading Palefill to 1.20 restores functionality (but then I miss the fixes for Google Docs and Pixiv). The offending commit seems to be https://github.com/martok/palefill/commit/dedc16d1c24ede66ff27b41b7f04651cf32c090f

No errors get logged anywhere, AFAIK.

dilworks commented 1 year ago

Figured out why: https://github.com/martok/palefill/blob/master/lib/main.js#L547

toLocaleFormat() was deprecated by Mozilla, and killed unceremoniously on FF58 - at some point SeaMonkey must have merged that, and therefore the entire script dies there. A suitable replacement is toLocaleDateString() instead - tried that and it seems to work OK, and should be safe to use on UXP browsers too.