0

Try to prevent third party script from my webpage.

How to stop this external unwanted script code from my webpage.

I try many scripts to prevent it but nothing helpful for me.

4
  • Can't help it, when problem is unknown Commented Sep 15, 2014 at 7:35
  • The question is unclear. Who has created the pages? Commented Sep 15, 2014 at 7:35
  • If you have automatic footer link of hosting site - replace hosting site ... Commented Sep 15, 2014 at 7:36
  • can you post link of your site and be more precise about what the problem is. is it div, just link or something else? Commented Sep 15, 2014 at 7:36

2 Answers 2

1

if the link to the external site is on a page you can access then you can use jQuery to achieve this.

For example: if the link to the external site look something like this

<a id='externalLinkID' href='http://www.ExteranlSite.com'>Link To External Site</a>

then when the page loads you can write.

$("#externalLinkID").removeAttr("href")
Sign up to request clarification or add additional context in comments.

Comments

1

in my website have add automatic footer link of Hosting site

This is a bit confusing because if you actually put the link, you should be able to remove it manually from your HTML. However, if the link it's auto-generated by your hosting company then FIRST you have to make sure you're not violating any terms and condition by removing the link. Some services offer free website designs but you have to display some attribution in your site...one of those is wix.com

Now, if you are sure you can legally remove the link, you could use the css's display property to hide it. However, this might not work if the link is added by a script that overrides this property, in this case you will need to using javascript to hide this element/link

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.