Skip to content

Instantly share code, notes, and snippets.

@ynishi2014
Created January 22, 2022 03:01
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 ynishi2014/8d1d951966d12d49c1eee898b4bacc17 to your computer and use it in GitHub Desktop.
Save ynishi2014/8d1d951966d12d49c1eee898b4bacc17 to your computer and use it in GitHub Desktop.
<script>
let API = false;
let win;
for (win = window; win.API == null && win.parent != null && win.parent != win; win = win.parent);
if (win.API) {
API = win.API;
console.log("API found");
} else {
console.log("API not found");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment