On 27/10/2020 08:29, Rainer Bielefeld wrote:
Nuno Silva schrieb:
It looks like flat() has been recently added to 2.53.6b1pre
Hi Nuno,
I tried that one. My results with latest 2.53.6 Version from
http://www.wg9s.com/comm-253-de/ :
all tested pages which showed the problem with my older 2.53.6 now work
fine.
Many thanks to our devs.
For use with older versions, you can do what the site devs should have
done and polyfill:
if (! Array.prototype.flat) {
Array.prototype.flat = (function (d) {
return [...(function* flatten(array, depth) {
if (depth === undefined) { depth = 1; }
for (const item of array) {
if(Array.isArray(item) && depth > 0) {
yield* flatten(item, depth - 1);
} else { yield item; }
}
})(this, d)];
});
}
With NoScript, make the above the value of
noscript.surrogates.array_flat.replacement (ie, in about:config) and set
noscript.surrogates.array_flat.sources to @nebenan.de. Other UserJS
solutions are available.
/df
--
London
UK
_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey