Hello! Is there a way to embed a javascript script into the source code of someone else's page? For example, when switching to a foreign site, Javascript code is inserted into its source code, which automatically fills in the form. Or can this case be implemented somehow differently, for example, through a GET request?


It is necessary to execute the code exactly locally, because deploying its server is already a hacking topic.

    2 answers 2

    In the address bar

    javascript: alert("Работает") 
    • Yes, that's what I wrote about) - Sergey Stepanov
    • And an expression of this type:> javascript: var op = document.getElementById ("FirstName"); op.value = "123" Doesn't work .... - AseN
    • So what? - AseN
    • 2
      Stupid firewall blocked this spank? e ytuj ntgthm njkmrj bp dt, -rjycjkb crhbgns bcgjkyz.ncz: '( - Sh4dow

    You can insert the JS code into the command line and execute it. Better describe the task to be done.

    • Task: when switching to a website, fill out the form, but all the time with different values. And the command line is, as I understand it, the console in the Google Chrome browser? - AseN
    • No command line, this is where the url address of the site is Sergey Stepanov
    • one
      No, "command line", as it was wrong to say @ Sergey Stepanov, this is just the browser's address bar - DemoS
    • Oh, thank you! Thank you very much. Could you give an example, please =) - AseN