Skip to content

Instantly share code, notes, and snippets.

@166MMX
Created August 13, 2021 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 166MMX/3cdebc80ebeac9635bd24a4b50b468b1 to your computer and use it in GitHub Desktop.
Save 166MMX/3cdebc80ebeac9635bd24a4b50b468b1 to your computer and use it in GitHub Desktop.
(function () {
const b = new Set(['previousElementSibling','offsetParent','parentNode','parentElement','nextElementSibling','nextSibling','previousSibling','documentElement','body','ownerDocument','firstElement',
'head','images','scripts','links','forms','scrollingElement','children','firstElementChild','lastElementChild','activeElement','ownerNode','childNodes','styleSheets','lastChild'
]);
const v = new Set();
const a = function (s, n) {
if (v.has(s)) {
return;
}
v.add(s);
for (const i of Object.getOwnPropertyNames(s)) {
try {
const e = Object.getOwnPropertyDescriptor(s,i).value;
if (typeof e === 'function' && e.name === 'nrWrapper') {
console.log('nrWrapper %s.%s', n, i);
}
if((typeof e === 'object' ||typeof e === 'function') && !b.has(i)) {
a(e,`${n}.${i}`)
a(e.prototype,`${n}.${i}`)
a(e.constructor,`${n}.${i}`)
}
} catch (e) {
}
}
};
a(window, 'window')
}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment