Reputation: 51
I'm trying to write a bookmarklet that augments the functionality of a website I frequently use. All the code of said website is in a single script encompassed in a self invoking function like so:
(function() {
var exampleVar=1;
// code
}).call(this);
I have no control over that website. How do I get the value of exampleVar
from the console or from a bookmarklet?
Upvotes: 0
Views: 162
Reputation: 40882
You can't, that's one of the purposes of scoping, to protect the variable form being accessed.
Upvotes: 0