Adding javascript js

Suppose we have a web page. We do not have direct access to this page, so we cannot change the source code, but we need to add js to it. Is there anyway? I mean, for example, external javascript or any other way.

+3
source share
3 answers

Without any access, you certainly cannot add a script to the site. What we are talking about? XSS instructions?

Perhaps you should clarify what exactly you are and why. The above statement remains true, without access, without constantly adding any script (without any xss attack).

If you just want to enter the code on the page that you open locally, you can just use any js console like Firebug. For instance,

var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement,
    scr  = document.createElement('script');
    scr.src = 'http://myserver/myscript.js';
    scr.type = 'text/javascript';

head.insertBefore(scr, head.firstChild);
+1
+1

Generally not, however a browser extension may be.

0
source

All Articles