views:

107

answers:

2

Possible Duplicate:
GreaseMonkey Simple Script

So I have this page with the html code and I want greasemonkey to replace it by another HTML code that I have. How can it be done ?

exemple I have

<html>
<body>

<h1>Cajuda</h1>

<p>Oliveira da serra</p>
<p>Oliveira da serra</p>
<p>Oliveira da serra</p>
<p>Oliveira da serra</p>
<p>Lagarta maritima</p>
</body>
</html>

and I want to transform in this :

    <html>
<body>
<td title="7885" nowrap="nowrap">Ovar</td>
<td>&nbsp;</td>
<td title="Online" align="center" bgcolor="#ff8288">H</td>
<td title="Offline" align="center" bgcolor="#88ff88">1</td>
<td>&nbsp;</td>

</body>
</html>
A: 

Here's a link to tutorials on How to write Greasemonkey scripts.

Reed Copsey
For that type of help you can just shutup
A: 

From the greasemonkey manual:

var theImage, altText;
theImage = document.getElementById('annoyingsmily');
if (theImage) {
    altText = document.createTextNode(theImage.alt);
    theImage.parentNode.replaceChild(altText, theImage);
}

The rest is available here.

jsight
that is to replace a certain image for a text totally different.