diff --git a/background.js b/background.js index fb71311..4761c92 100644 --- a/background.js +++ b/background.js @@ -56,7 +56,7 @@ class uDarkC extends uDarkExtended { regex_search_for_url_raw = /url\(\s*?(('.+?(? x, conditon = x => x, result_editor = x => x, getter) { + functionPrototypeEditor(leType, laFonction, watcher = x => x, conditon = x => x, result_editor = x => x) { // console.log(leType,leType.name,leType.prototype,laFonction,laFonction.name) if (laFonction.concat) { return laFonction.forEach(aFonction => { @@ -378,11 +378,11 @@ class uDarkC extends uDarkExtended { Object.defineProperty(leType.prototype, laFonction.name, { value: { [laFonction.name]: exportFunction(function() { - if (conditon === true || conditon(this, arguments)) { + if (conditon === true || conditon.apply(this, arguments)) { // if a standard function is provided, it will will be able to use the 'this' keyword // console.log("Setting",leType,laFonction,this,arguments[0],watcher(this, arguments)[0]) let watcher_result = watcher(this, arguments); // console.log("watcher_result", this,originalFunction,watcher_result,originalFunctionKey,leType.prototype[originalFunctionKey],this[originalFunctionKey],this.getP); - let result = originalFunction.apply(this, watcher_result) + let result = originalFunction.apply(this, watcher_result) // if a standard function is provided, it will will be able to use the 'this' keyword return result_editor(result, this, arguments, watcher_result); } else { return (originalFunction.apply(this, arguments)); @@ -674,6 +674,7 @@ class uDarkC extends uDarkExtended { } frontEditHTML(elem, strO, details, options = {}) { + // 1. Ignore