That is Userjs.

On the website page there is a variable, let's say:

var one = 1; 

From user script in opera, I can intercept this variable like this:

 window.one 

In chrome and fox, I can not. How else can you intercept?

  • Do you need from userscript? From the console, everything is perfectly picked up. - ling

1 answer 1

If you mean changing a variable through the address bar, then I can say that there is at least 1 way to intercept and change a variable - it’s just to get into the JS-script plugin and do your insidious thing =) In Google Chrome, for such things very handy tool, it is called on F12 . There you can track where the program is turning when submitting a form, for example. Or view the entire structure of the site, in the form of a tree of files.

If you did not mean the address bar, then I would say that the JS-Script can be executed in it. It is very simple to do this: write "javascript:" at the beginning of the address bar and then execute any code. For example, this one displays a message:

  javascript: alert('') 

If you just need to hide the value of your one variable, you can do this with the obfuscator ( one of them ). Or invent your own clever way of hiding the value of a variable.

  • It needs to read (or write) the value of the global variable belonging to the page from the browser extension. - Qwertiy
  • @Qwertiy, after almost 5 years, he most likely doesn’t need anything :) - AseN