A javascript function must search the special links (copyright urls) in a html web page.
If it doesn’t find the special urls, then must give an alert. “Div ID check” and “Div length check” are good ways, but is it possible to directly control the links (urls)?
I am already aware that this does not protect the links.
Example of JavaScript file:
if () {
//If function find the copyright links, then null - don't make anything:
}
else {
//If function doesn't find copyright links, then give an alert:
alert("Please protect original copyright links.");
}
Example of html page:
<html>
<head>
<script type='text/javascript' src='http:// ... file.js'></script>
</head>
<body>
<!-- Start Copyrigt Area -->
<div id="footer">
<a href="http://example1.com">example1.com</a>
<a href="http://example2.com">example2.com</a>
</div>
<!-- End Copyrigt Area -->
</body>
</html>
A far as why I am doing this is concerned, here are my reasons:
I made some themes for special blog community site. Sometimes, our theme users remove or change our copyright links in the footer area. The blog community site doesn’t support any dynamic content like php, we can use only html and some special content tags in a one page.
On the other side, this site doesn’t allow JS hosting, etc. So, JS files provided by third party hosting providers.
I don’t want encrypt the code. So I think we check the links with a JavaScript function. If our links removed or changed, then users must get an alert.
Maybe, some theme users find these javascript function and removes them and re-host the codes. But I think most of them will can not anything.
Based on your description, I think you should check both the link and it’s text. Suppose you’re using JQuery: