Skip to content

Instantly share code, notes, and snippets.

@unixpickle
Created July 16, 2017 16:13
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 unixpickle/052b16c9c9f3e28b850406f23a69fc59 to your computer and use it in GitHub Desktop.
Save unixpickle/052b16c9c9f3e28b850406f23a69fc59 to your computer and use it in GitHub Desktop.
Find Construct2 views
Object.keys(cr_getC2Runtime()).filter((x) => {
var obj = cr_getC2Runtime()[x];
if ('object' !== typeof obj || !obj) {
return false;
}
var keys = Object.keys(obj);
if (keys.length === 0 || keys.some((x) => x.length > 4)) {
return false;
}
return keys.some((x) => obj[x] && 'undefined' !== typeof obj[x].visible);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment