Am 14.02.2013 11:20, schrieb Ben:
Sorry, I meant:
if "width=320px in <td> tag" then
    set width=500px;

Assuming your td element is saved in the a variable called "elem", you can use this (not very clean but it works):

var elemStyle = elem.getAttribute("style", false).replace(/\bwidth\s*:\s*320px\b/i,"width: 500px");
elem.setAttribute("style", elemStyle);

However I'd also recommend to learn the JavaScript and DOM basics before you start to write scripts. Not only that your code will be much cleaner than the one above, but also you'll not need to ask a
Greasemonkey user mailing list for general JavaScript questions ;)

Chris

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to