On 10/28/13 11:08 AM, Ben Stover wrote:
Ok lets start at first with a sample web page. On the following page you see
some nasty
<br />
tags at the end of all lines in textareas:
http://www.zdnet.de/39146400/ajax-optimal-einsetzen/?print=1
How can I remove them with GM?
The following does NOT work:
var t = document.getElementsByTagName('textarea');
for(var i = 0; i < t.length; i++) {
t[i] = t[i].replace(/<br\s\/>/g, "");
or
var pane = document.getElementById("Outline");
pane.innerHTML = pane.innerHTML.replace("<br\s*\/>","g"), "");
Why do my solutions not work?
What else can I do?
Thank you
Ben
The data in a textarea is in the textarea's value property, so I'm
guessing (but haven't tried) t[i].value = t[i].value.replace(...).
Brian
--
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 greasemonkey-users+unsubscr...@googlegroups.com.
To post to this group, send email to greasemonkey-users@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/groups/opt_out.