0
Many google Aces use javascript to work, in authentication they use <meta name="google-signin-client_id" content="api-key">
and javascript reads this to authenticate, as they do for Javascript to read this?
0
Many google Aces use javascript to work, in authentication they use <meta name="google-signin-client_id" content="api-key">
and javascript reads this to authenticate, as they do for Javascript to read this?
1
You can use document.querySelector
to select DOM/page elements and extract what you are looking for.
To read the example you have indicated you can do so:
var apiKey = document.querySelector('[name="google-signin-client_id"]').getAttribute('content');
console.log(apiKey);
What this code does, by steps:
document.querySelector
- search the page for an element that matches the selector passed, where the attribute name
was: _"google-signin-client_id"_ getAttribute
- fetch the value of the attribute passed to the methodBrowser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
Thanks for the help!
– The Coder
@Thecoder glad to help :)
– Sergio