Jump to content

Tweaking Some Webcode For Greasemonkey Script..?


cyfer65
 Share

Recommended Posts

I'm trying to make a GreaseMonkey Script that I want to remove the style="display: none" part in the below webcode on a page..And also I want to insert a website in front of "page.php?code=123" what would the JavaScript code look like to do something like this..??-------------------------------------------------------------------------------------------------------<span id="XXX" style="display: none"><div align=center><a onClick="document.getElementById('XXX').style.display='none';document.location='(Insert WebSite Here!)page.php?code=123';" href="#">Click Here</a></div></span>-------------------------------------------------------------------------------------------------------

Edited by cyfer65
Link to comment
Share on other sites

document.getElementById('span_id').style.display = '';To edit the onclick handler you'll need to get the element and redefined what happens on click. You get the element the same way, using document.getElementById. You'll need to give the <a> element an ID to do that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...