-3
I created a theme and would like if (only if) the credits contained within the class creditos
are removed or tampered with by someone, the page will be redirected to my portfolio.
I found many codes, however, this one I chose is giving error, because it redirects even if the link is correct.
I mean, if I put Design by <a href='endereço falso...
or is exactly the same as the code below, it redirects the customer’s website to my portfolio in the same way.
<div id="creditos">
<span class='creditos'>Design por <a href='https://meuportfolio.com' target='_blank'>Nome do designer.</a></span>
</div>
<script type='text/javascript'>
$(document).ready(function() {
if ($('span.creditos') != 'https://meuportfolio.com') {
window.location = 'https://meuportfolio.com'
} else {
return False;
}
});
</script>
How to correct?
If the client removes the credits, it will remove the redirect as well, that’s irrelevant. The only viable solution is to force a license.
– KNP
Indeed, this is irrelevant, as if the customer has the possibility to remove the class
creditos
consequently he will be able to remove the script. I saw something similar in a post, where the owner created some functions and Apis and hosted on their platform, so when the user imported the script (the code was all overshadowed) could not remove a tagmeta
html, because it kept checking if it was not changed, if it was changed, it deconstructed html and displayed an error message where it signaled the tagmeta
was amended! (required to keep it by using the script)– gleisin-dev
Yes, I’m aware of that (and I’m already taking care of the license details too), but still, I’d like to know how to make this code work to do it ALONG with the license.
– Mari
you can apply the same example above..
– gleisin-dev