I have a unique idea for a browser based application that I'm considering developing and selling. The only problem is that it would all be HTML/Javascript based code. It is not a web-based service that I would host and others would use. It is something that clients would purchase and use either on their own local server or even on their own local desktop, since the HTML/Javascript would not necessarily require a web server.
My question is, how do I go about selling something that open? Anyone who demo'ed it would basically have the full source.
And also, how do I protect it? If a company bought a seat of it, how could I prevent them from using it on 100 different computers? Is there any type of protection scheme I could use?
EDIT: My apologies. I changed the title to be more specific because I'm not talking about FOSS software but rather software who's code is easily accessible to the user.
UPDATE: I think the simple answer is that I can't fully protect it, but at least I could obfuscate the heck out of the source to make it difficult (but unfortunately not impossible) to reverse engineer.