Click to See Complete Forum and Search --> : Did you know that...


Vladdy
03-08-2003, 10:24 AM
you can find out if your javascript function has been altered using the following code:

function somefunction()
{ a=b+1;
c=a-b;
}

somefunctionLength = (new String(window.somefunction)).length


So now you can mess with someone who decides to modify your code without asking you first by doing things like:
if(somefunctionLength!=123) document.body.innerHTML='mua-ha-ha';
:D :D

AdamBrill
03-08-2003, 11:00 AM
LOL... :D That's funny. :) I think I'm going to go make a script that is impossible to read and impossible to modify... ;) It might be fun... :cool: hehe

AdamBrill
03-08-2003, 12:05 PM
I think he meant someone stealing your code. At least that's what I thought he meant... :) Actually, I was kidding about writing a script like that, anyway. If someone wants to steal my code, I'm all for it. That's one of the best ways to learn...

khalidali63
03-08-2003, 12:12 PM
:p
I'd like to know that how in gods name you will hide your code,once a user has the code and he/she changes it on theier hard diskwhat make you think they will leave that function of yours to make them feel bad..lol

Very very ...unrealistic script

:cool:

Khalid

AdamBrill
03-08-2003, 01:24 PM
Originally posted by Dave Clark
But if they copy the code, then they can delete out the check for the size of the code, too. Right? ;) Well, sure, they could, but you could make it really hard to read and do other things to make it a pain to modify. You could probably end up with a script that is easier to rewrite than to modify...

Originally posted by Khalidali63
I'd like to know that how in gods name you will hide your code,once a user has the code and he/she changes it on theier hard diskwhat make you think they will leave that function of yours to make them feel bad..lol Yeah, they could modify it to not have it in there. But you could just make it a pain in the butt, which seems to be a big thing for some people... the type of people that think they made something that no one else could possibly make... At least that's what they seem to think. What I don't get is how they can think they made something that good and still don't know how to make a no right click script??? Seems kind of dumb to me... :D Personally, like I said above, I'm happy if someone can learn something from my code...

Vladdy
03-08-2003, 02:37 PM
The thing is that those who are capable to read through a script and find out what is doing what and then delete the parts that are causing trouble are:
- capable of writing the same or better type of script on their own.
- are few and far in-between.

The majority of cut-n-pasters can not figure out why the two scripts they copied from different places do not work together, when there is something obvious like using a same variable. That is the type you can have alot of fun with :D :D

AdamBrill
03-08-2003, 02:56 PM
Originally posted by Dave Clark
I heard dat! ;) Yeah, man. :D Maybe the reason that people are trying to hide their code isn't because it is so good but because it is sooo bad. :) That would be more accurate in most places. ;) Something makes me doubt that is what they are thinking, though. :D

AdamBrill
03-08-2003, 03:44 PM
Originally posted by Dave Clark
...or, because they're trying to hide the fact that they "stole" it and don't want to give credit where credit is due. :p I know somebody who is guilty of that. ;) LOL :) I didn't even think of that. :D Maybe your right... ;) Most of the time, though, it is just people that just started coding and think they just made the best code that has ever been made. If they would spend the time that they spend trying to hide their code just making their site better, their site would probably be twice as good. :D Then they would think they REALLY have to hide the source... :rolleyes: LOL