Changed qu's HTML element detection. Passing base actor instead of actorName to profile scrapers.

This commit is contained in:
DebaucheryLibrarian
2020-07-21 01:16:26 +02:00
parent 0e4c0d8fff
commit 939eba8e61
9 changed files with 84 additions and 16 deletions

View File

@@ -326,9 +326,9 @@ function init(element, window) {
const quContextFuncs = Object.entries(quFuncs) // dynamically attach methods with context
.reduce((acc, [key, func]) => ({
...acc,
[key]: (...args) => (args[0] instanceof globalWindow.HTMLElement // allow for different context
? func(...args)
: func(element, ...args)),
[key]: (...args) => (args[0].nodeType === undefined // allow for different context
? func(element, ...args)
: func(...args)),
}), {});
return {