SN
Size: a a a
SN
S
fn = (arr, value) => (
const indexes = arr.reduce((acc, {id}, index) => (
id !== 1 ? acc : [...acc, index])
), []);
if(indexes.length === 0) return []
return indexes.length > 2 ? [indexes[0], indexes[indexes.length - 1]] : [indexes[0], indexes[0]]
)
S
S
S
0
SN
fn = (arr, value) => (
const indexes = arr.reduce((acc, {id}, index) => (
id !== 1 ? acc : [...acc, index])
), []);
if(indexes.length === 0) return []
return indexes.length > 2 ? [indexes[0], indexes[indexes.length - 1]] : [indexes[0], indexes[0]]
)
SD
S
S
SD
S
SD
ᴀs
S
AG
(() => {
const open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function (...arg) {
open.apply(this, arg);
if (arg[1].match('/cart/add.js')) {
this.addEventListener('readystatechange', () => {
if (this.status === 200) {
console.log(123);
}
}, {once: true});
}
};
})();
AG
TP
ES