// ==UserScript==
// @name Lootboy fixer
// @namespace https://steamcommunity.com/id/vval1ant/
// @version 1.0.1
// @author VAL1aNT
// @match https://www.lootboy.de/*
// @grant none
// ==/UserScript==
const myJSscr = "\n\
Object.defineProperty(Array.prototype, 'flat', {\n\
value: function(depth = 1) {\n\
return this.reduce(function (flat, toFlatten) {\n\
return flat.concat((Array.isArray(toFlatten) && (depth>1)) ? toFlatten.flat(depth-1) : toFlatten);\n\
}, []);\n\
}\n\
});\n\
Object.defineProperty(Array.prototype, 'flatMap', {\n\
value: function(callback, thisArg) {\n\
return this.map(callback, thisArg).reduce((a, b) => a.concat(b), []);\n\
},\n\
configurable: true,\n\
writable: true\n\
});\n\
";
var hdr = document.getElementsByTagName('head').item(0);
var HDs = document.createElement("script");
HDs.type = "text/javascript";
HDs.appendChild(document.createTextNode(myJSscr));
hdr.appendChild(HDs);