Hi everyone,
I have the security alert (I included the alert() function in my scripts) on my live preview for protect my script – the way works fine, but I am not sure whether it may affect the sale.
What do you think about it?
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Europe
- Has been a member for 3-4 years
- Referred between 10 and 49 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
How is this protecting your file?
Tean saidHi Tean,
How is this protecting your file?
So, I put all the scripts in one file. I put the alert () function with a message in the same file. Finally, I obfuscate the script. The trick works perfect because I don’t see any illegal distributes of my script. 
- United Kingdom
- Community Superstar
- Attended a Community Meetup
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 5 000 and 10 000 dollars
- Has been a member for 2-3 years
- Microlancer Beta Tester
- Bought between 100 and 499 items
- Referred between 10 and 49 users
To be perfectly honest, an alert() does nothing, i can still go in and steal the code if I wanted too. You need to obfuscate the code and even then its not imposable to steal, just 1 more step for stealers.
Adding the alert probably serves to make people try and hack your script, serves as an invitation.
Great script and demo site! In my opinion, the alert seems unprofessional. I would take it down and either trust people with the live preview or else just do videos. Obfuscating the code is a great idea as it makes most people unable to just grab and go, stealing your script easily. At least they have to do some work. Even as easy as it is to unobfuscate code. I wish there was a good way to make it where people could not steal css or js…
Thanks for the all replies. I removed the alert message 
You can’t protect client side code, it’s impossible. There is always a way to get around the protection, no matter how advanced. If it can be protected, it can be unprotected.
Thecodingdude said
You can’t protect client side code, it’s impossible. There is always a way to get around the protection, no matter how advanced. If it can be protected, it can be unprotected.
You’re right, but I thought that the trick impeding illegal check of my script.. 
For jQuery demos I’ve added a function, which checks the location.host. If this does not match the live preview site domain it will create an alert. Then obfuscate the code.
At least makes it harder to copy and you dont have the problem of alerts in the demo site.
