Lets start with an example webpage from a (german) online news magazine. If you click on the tiny "print" icon a print layout page will be presented.
http://www.focus.de/panorama/welt/wer-knackte-die-boeing-systeme-hier-stimmt-etwas-nicht-emirates-chef-fordert- aufklaerung-ueber-mh370_id_3904374.html If you click now the "Drucken" button the page will be printed (e.g. into pdf). As you can see there is no URL embedded on the page. So I use Greasemonkey script and the following code to insert it just above the headline: ------------------ var address = document.URL.replace("?drucken=1",""); var div = document.getElementsByClassName("div.articleHead")[0]; div.innerHTML = "<a href=\"" + address + "\">" + address + "</a><br/>" + div.innerHTML; ------------------ Unfortunately the code does not work. Nothing is inserted. Why not? Ben -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
