DeeW. Posted June 25, 2014 at 04:12 PM Report #560378 Posted June 25, 2014 at 04:12 PM É possível fazer com que um código funcione só em tal url/site? pois quero proteger um javascript meu, e obfuscação não seria o suficiente.
nelsonr Posted June 25, 2014 at 04:16 PM Report #560380 Posted June 25, 2014 at 04:16 PM Apesar de achar que isso não dá muito para dar a volta, podes verificar o url (location.href) 1 Report
DeeW. Posted June 28, 2014 at 02:00 PM Author Report #560661 Posted June 28, 2014 at 02:00 PM Obrigado amigo! fiz dessa maneira: if(location.href === "http://site.com/link-registro"){ //Código Desejado se o location.href for o desejado! };
I-NOZex Posted June 28, 2014 at 07:43 PM Report #560705 Posted June 28, 2014 at 07:43 PM Obrigado amigo! fiz dessa maneira: if(location.href === "http://site.com/link-registro"){ //Código Desejado se o location.href for o desejado! }; mas tambem é facilmente alteravel... tudo que se passe no cliente dificilmente poderá ser controlado... B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net
DeeW. Posted June 29, 2014 at 02:16 PM Author Report #560733 Posted June 29, 2014 at 02:16 PM Sim, mas fazendo isto, e obfuscando o código, é díficil de alguém pega-lo! Resolvido!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now