dimanche 10 juillet 2016

Changing existing html tag with javascript (open btn site in new window)


So I have (not my site, I just want to change the function of it using greasemonkey) has this button below;

 <input name="1$Main$Edit" value="Edit"
        onclick="window.location.href='https://www.google.com/'; return false;"
        id="l_Main_Edit" title="Edit" class="whitebtn" type="submit">

How can I change this (in greasemonkey) so whenever I click on it, it then opens in a new tab? Note that the site is different per button therefore I would not want to change/replace that. I've tried searching around but could never find a definitive answer as it involves entering the url myself in the edit as well.


Aucun commentaire:

Enregistrer un commentaire