Ensure javascript badge / widget html is not changed -


One of my clients wants to distribute JavaScript widget, so people can put it on their website. Although he wants to ensure that backlinks are retained (for SEO purposes and part of the price of using widgets) is intact. Then the distributive JavaScript may look like this:

  & lt; Script id = "my-script" src = "http://example.com/widget-script.js" & gt; ; & Lt; / Script & gt; & Lt; Div style = 'font-size: 10px' & gt; & Lt; A href = 'http: //www.example.com/backlinkpage.html'> Visit Exaxmple.com & lt; / A & gt; & Lt; / Div & gt;  

Widget- script.js will display some html on the page. But we want to make sure that some Wiley Webmaster does not erase the previous link. If they do, we can display a message like "Widget installed incorrectly" or something else

Any 100% ways to stop it, I'm scared.

You enter a link with Javascript yourself, but by then the PageRank will be for zero. You can be it give HTML with a link with an ID like mycompanybacklink and check with Javascript if the element exists or not, if not, the badge will not display Or whatever happens, if this happens, you can verify that the link of href is your website and its text is what you want, you have to edit the HTML that you posted as a sample so that Link screen Before the T, not then. Element may still exist, but is blocked by any other element or just hidden with CSS. After this you can do anything that comes with the jQuery selector: instead of looking at the CSS property yourself (which is most likely to try the webmaster) you can only see that element or his parents I have taken or no place in the document I think it is done with offsetwid and offset heights but I'm not sure. While looking, though ....


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -